#14426 closed New Feature (duplicate)
image2 plugin should have a way to allow for custom image tags that won't be upcast
Reported by: | Matthew | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Widgets | Version: | |
Keywords: | Cc: |
Description ¶
Steps to reproduce ¶
I have a plugin that generates <img> placeholders and when image2 is installed it's causing a number of errors because upcastWidgetElement is attempting to convert it to a widget. There is already a special case in here to avoid the 'data-cke-realelement' but it would be nice if there was also a way to specify a editor.config property for additional class(es) (or attributes) that could be used to flag other <img> that we also didn't want to be processed by this method. This would avoid modification of this method.
I could possibly add the data-cke-realelement attribute to the img but that would still not fix any previous placed images.
Thanks!
Expected result ¶
Only image tags not part of this list are upcast
Actual result ¶
All image tags are upcast
Other details (browser, OS, CKEditor version, installed plugins) ¶

Change History (4)
comment:1 Changed 9 years ago by
Summary: | image2 plugin should have a way to allow for custom image tags that won't be overridden → image2 plugin should have a way to allow for custom image tags that won't be upcast |
---|
comment:2 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Version: | 4.5.7 |
comment:3 Changed 9 years ago by
Sorry, I have missed that #11186 has already been implemented :P
http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback

Looks like a duplicate of #11186.
It seems that point 3 mentioned in that ticket will solve your problem once this feature is implemented.