Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked inline images can be added to table/image captions #9794

Closed
LukaszGudel opened this issue May 31, 2021 · 1 comment · Fixed by #9829
Closed

Linked inline images can be added to table/image captions #9794

LukaszGudel opened this issue May 31, 2021 · 1 comment · Fixed by #9829
Assignees
Labels
package:image squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@LukaszGudel
Copy link
Contributor

Steps:

  1. Add linked inline image.
  2. Toggle table caption.
  3. Drag&drop or copy&paste image into table caption.
  4. Convert image to block.
CKE5-inline-linked-table-caption.mp4

Result:

Editor crashes with error:

writer.js:1489 Uncaught TypeError: Cannot read property 'getAttribute' of null
    at setAttributeOnItem (writer.js:1489)
    at Writer.removeAttribute (writer.js:421)
    at Object.callback (imagestylecommand.js:117)
    at Model._runPendingChanges (model.js:839)
    at Model.change (model.js:184)
    at ImageStyleCommand.execute (imagestylecommand.js:101)
    at ImageStyleCommand.<anonymous> (observablemixin.js:258)
    at ImageStyleCommand.fire (emittermixin.js:199)
    at ImageStyleCommand.<computed> [as execute] (observablemixin.js:262)
    at CommandCollection.execute (commandcollection.js:69)

Notes:

  • this image needs to be linked as captions do not allow inserting nonlinked inline images
  • linked image can be also inserted into image captions, but converting it to block will remove an image
@LukaszGudel LukaszGudel added type:bug This issue reports a buggy (incorrect) behavior. package:image squad:core Issue to be handled by the Core team. labels May 31, 2021
@oleq
Copy link
Member

oleq commented Jun 1, 2021

Inline images should be blocked in all sorts of captions in MVP1. This is is a valid use-case, though (e.g. emoji-as-image).

@AnnaTomanek AnnaTomanek added this to the iteration 44 milestone Jun 7, 2021
niegowski added a commit that referenced this issue Jun 8, 2021
…-in-captions

Fix (engine,image): Disallowed inline images in `caption` elements. Closes #9794.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants