As claimed by #741606-61: Teaser splitter / text fields with summary support the dev version should now include the Summary field functionality, but I did not see it working with CKEditor 3.6.6.7689 installed here. I see this JS error:

TypeError: wysiwygInstance is undefined
    

var enabledPlugins = wysiwygInstance.pluginInfo.instances.drupal;

/sites/all/modules/wysiwyg/editors/js/ckeditor-3.0.js (line 115, col 11)

I see this error when I click Edit Summary and the Summary field becomes unusable (is removed).

CommentFileSizeAuthor
#5 wysiwyg-2639738.5.patch2.17 KBTwoD
#3 wysiwyg-2639738-3.patch1.54 KBTwoD
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ñull created an issue. See original summary.

ñull’s picture

The compatibility chart claims that version ckeditor 3.6.6. is supported. Upgrading to version 4.5.6, supposedly not supported, seems to fix the issue. May be the chart needs some updating?

TwoD’s picture

Status: Active » Needs review
FileSize
1.54 KB

I'm sorry for the delay, I've been moving house and haven't got everything in my dev environment back up yet. (First full day at my new job! :D)

3.6.6 is supported by the last stable release, and remains fully supported by the 7.x-2.x branch. CKeditor 4 is only supported by that branch.
This is problem is interesting, wonder why I didn't encounter it when testing the patch which introduced that code....

Apparently, CKEditor 3 can call the pluginsLoaded callback much earlier than CKEditor 4 does, even before the instance is fully created.

This patch moves the reference to Wysiwyg's internal state data into the instance settings instead of attaching it to the final instance object.
I'm not really happy about exposing internal state this way (the existing code already does), but I suppose there's not much choice without making things even more complex.

ñull’s picture

The patch fixes summary with ckeditor 3.6.6 but will fully break the functionality with ckeditor 4.5.6.

I also notice with this patch that the summary field with ckeditor 3.6.6 is not high enough so that no space to write is left between the top toolbar and the bottom status bar. Users each time will have to resize the text area height manually before they can start writing. Without the patch and with 4.5.6 this is OK.

TwoD’s picture

FileSize
2.17 KB

Field height calculation is messed up by it being a hidden (and often tiny) field when the editor attaches. I think that'll be covered by a different patch though so I'm not going to worry about it here.

Good that it worked for you with CKEditor 3.x. CKEditor 4 does not work with this patch because it clones the settings object and gets tripped up by the internal Wysiwyg data being there (it does not have access to the correct parameters for creating a new object instance using Wysiwyg's internal constructor function.)

Try this one instead. Don't know why I didn't think about doing it this way earlier...

  • TwoD committed 84508d4 on 6.x-2.x
    - #2639738 by TwoD: Fixed internal instance tracking for CKEditor.
    
  • TwoD committed 7891b52 on 7.x-2.x
    - #2639738 by TwoD: Fixed internal instance tracking for CKEditor.
    
TwoD’s picture

Status: Needs review » Fixed

Pushed this up as my tests now pass for both CKEditor 3.x and 4.x. Please re-open this issue if you're still having problems.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.