When using the Insert module with CKEditor, it gets stuck in an endless loop.
In ckeditor-3.0.js there is this code:
while (children.count() > skip) {
item = children.getItem(skip);
switch(item.type) {
case 1:
CKEDITOR.instances[this.field].insertElement(item);
break;
case 3:
CKEDITOR.instances[this.field].insertText(item.getText());
skip++;
break;
case 8:
CKEDITOR.instances[this.field].insertHtml(item.getOuterHtml());
skip++;
break;
}
}
If it hits a point where item.type doesn't exist, it will never get out of the loop.
I added:
default:
skip++;
to get past those and it fixed the problem but I don't know if that's the best solution. If this is something the maintainer wants to add to the module, I can make a proper patch. Otherwise, I'm just noting it here for reference and in case anyone else runs into it.
Comments
Comment #3
twodThanks, that change makes sense, sorry for the long delay!
Comment #4
michelleThanks! I've been around Drupal a long time and a commit in less than a year is not a "long delay". LOL!