If I active IPE mode, click 'Add new pane' button, select 'New custom content' - CKEditor will show up, but if then I click on 'Cancel' button and click on on 'New custom content' again - CKEditor won't show up with Javascript error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

k0teg’s picture

FileSize
537 bytes

Here is a workaround for this issue.

artemln’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
490 bytes

When use this patch switching the text formats does not work. Because the CKEditor does not remove old HTML.
I have attached a new patch.

DamienMcKenna’s picture

This would be good to confirm & fix for the next release.

MediaFormat’s picture

Status: Needs review » Needs work

Ran it on simplytest.me, using chrome.
Here is the console log :

Uncaught TypeError: Cannot read property 'clearCustomData' of null ckeditor.js:1005 
CKEDITOR.tools.createClass.proto.detach ckeditor.js:325 
CKEDITOR.editor.editable ckeditor.js:227 
CKEDITOR.tools.extend.destroyVM5932:202 
Drupal.ckeditorOffVM5932:291 (anonymous function)jquery.js?v=1.4.4:34 
b.extend.eachjquery.js?v=1.4.4:27 
b.fn.b.eachVM5932:288 attachCKEditorVM5932:349 
Drupal.behaviors.ckeditor.attachdrupal.js?nit0n9:76 
(anonymous function)jquery.js?v=1.4.4:33 
b.extend.eachdrupal.js?nit0n9:74 
Drupal.attachBehaviorsmodal.js?nit0n9:301 
Drupal.CTools.Modal.modal_displayajax.js?v=7.34:400 
Drupal.ajax.successajax.js?v=7.34:164 
Drupal.ajax.ajax.options.successjquery.js?v=1.4.4:143 
c.extend.handleSuccessjquery.js?v=1.4.4:142 
c.extend.ajax.w.onreadystatechangeXMLHttpRequest.send (async)jquery.js?v=1.4.4:142 
c.extend.ajaxajax.js?v=7.34:255 
Drupal.ajax.eventResponsepanels_ipe.js?nit0n9:431 
Drupal.ajax.eventResponseajax.js?v=7.34:178 
(anonymous function)jquery.js?v=1.4.4:64 
c.event.handlejquery.js?v=1.4.4:57 c.event.add.h.handle.o
nagy.balint’s picture

I have the same issue, but for me the workaround does not work.

nagy.balint’s picture

Likely the issue is that the "$(document).trigger('CToolsDetachBehaviors', $('#modalContent'));" Is not triggered when the cancel button is pressed so ckeditor will not call its detach function.

nagy.balint’s picture

recrit’s picture

Patch at #2 worked for me when switching formats of a text field within an embedded paragraph.
EDIT: This removed the js errors, but now when switching between formats it will create a new editor after each switch, stacking them on top of each other.