Non-threaded

Forums » Bugs & Problems » Read Thread

Post reports about problems or bugs in here.
This bug was closed 8/27/2019: Fixed

Rich-text Editor Erases Images Redux

7 years ago

Wanna finally get to the bottom of this. CKEditor, the rich-text editor, has an element whitelist. Any elements not on the list are filtered out when the editor loads, and it just so happens that images are not on the list. The function that loads the editor, CKEDITOR.replace(), has an object passed to it with additional configuration information; adding the following property to that object should prevent it from erasing images.

extraAllowedContent:'img[*]{*}'

Any img tag, any attributes, any style. It's a bit of a catch-all; if stricter conditions are needed, this section of the CKEditor docs should be helpful.

Rich-text Editor Erases Images Redux

5 years ago

@BradinDvorak is this fixed? I’m not exactly sure from the OP what the problem is but that’s not the only way to configure CKEditor.

Rich-text Editor Erases Images Redux

5 years ago
He's referring to the notorious RTE eating images in a storygame bug.

Rich-text Editor Erases Images Redux

5 years ago

Ah — I don’t know much about this but suspect it might be fixed. Would love for someone who has reproduced this in the past to test.

Rich-text Editor Erases Images Redux

5 years ago

The CKEditor would allow images to be input, so they went through when saved, but would also purge images when it loaded, so they'd have to keep being reinserted.

But yeah, the issue's definitely gone on my end.

Rich-text Editor Erases Images Redux

5 years ago

Great!