Hello

I reproduced this bug on scald Galaxie.

  • I drag and drop an scald image in a CKEditor field
  • I select the image
  • I click on the anchor button.
  • I write an url in the text field
  • I click on OK, but noting happend

In the JS Console log, I got :

Uncaught TypeError: Cannot read property 'collapsed' of undefined link.js:35
onOk link.js:35
(anonymous function) ckeditor.js:447
h ckeditor.js:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12
CKEDITOR.tools.extend.onClick ckeditor.js:468
(anonymous function) ckeditor.js:412
h ckeditor.js:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12
CKEDITOR.ui.dialog.button.CKEDITOR.tools.extend.click ckeditor.js:411
h ckeditor.js:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12
(anonymous function) ckeditor.js:42

Comments

jcisio’s picture

Title: Adding link to an atom - JS Error - Uncaught TypeError: Cannot read property 'collapsed' of undefined » Allow to add a link on an atom
Category: bug » feature

It was not possible to add link on a rendered atom, because it was lost when the render is rebuilt. So it is not a bug.

I'm switching this issue into a feature request and implementing it.

jcisio’s picture

Status: Active » Fixed

Fixed with 3d4cfc6. Now it is a hardcoded "link" options but it should be extensible with a hook. Follow-up created #1972580: Allow to add arbitrary render options to embedded atoms in WYSIWYG editor.

jcisio’s picture

Title: Allow to add a link on an atom » Allow to add link on embedded atoms
jcisio’s picture

I've just pushed another commit to solve a UX problem. Now the link textfield is disabled if the atom if not of type image.

Status: Fixed » Closed (fixed)

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