Hi,

I uncovered an issue with CKEditor Link while testing out 4.3.x versions of CKEditor.

It appears that the new widget items, such as images created by the image2 plugin, are non-editable parts of content . The call to getRanges(true) does not follow suit with the link plugin and renders it impossible to add an internal link from the drupal dropdown selection to a widget item due to a bug in CKEditor.

For more details on the relevant issue in CKEditor see: CKEditor Ticket #11493

Steps to reproduce:

  1. Install 4.3.x version of CKEditor on your Drupal site that includes new image2 widget
  2. Insert image via widget
  3. Highlight image
  4. Attempt to link to internal Drupal page via ckeditor_link's plugin
  5. Attempt will fail with a JavaScript error being unable to get the value of collapsed from a null object

I have attached a patch (albeit a minor one) to correct the issue. I believe this brings the function closer to the intended usage of this API call. This allows this project to function with CKEditor 4.3.x versions prior to the resolution of ticket 11493. I haven't found any side-effects of this so far, but that doesn't mean there aren't any outstanding issues.

CommentFileSizeAuthor
widget_api_adjustment.patch577 bytesmisterkay
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anrikun’s picture

It looks like ticket #11493 was fixed.
Can you try if it works without any patch then?