ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.49k stars 3.7k forks source link

Add option to enable custom elements rendering #12854

Open Mgsy opened 1 year ago

Mgsy commented 1 year ago

📝 Provide a description of the new feature

The current approach for custom elements is similar to HTML comments - we preserve them in the model and in the data pipeline, but we don't render them in the editing view, so for example, this markup:

<internal>
   <p>Foo</p>
</internal>

is visible in the data:

in the model:

but not in the editing view:

This feature request is about enabling custom elements rendering and editing. 

Some notes from the previous work on bringing support for custom elements: https://github.com/ckeditor/ckeditor5/issues/11432#issuecomment-1103686979 

Kind of related: #12838 


If you'd like to see this feature implemented, add a 👍 reaction to this post.

Joshuajrodrigues commented 1 year ago

any update on this ? i have the same issue but with the "text " element

Witoso commented 1 year ago

Handling of custom elements can be defined with General HTML support. I'm not sure what you meant by the "text" element.

Joshuajrodrigues commented 1 year ago

hey again @Witoso , so for this we reached out to support and were notified that this feature is not available. Basically we are having all our existing data from our old RTEEditor nested in a text tag.

existing data is enclosed in text

hello world

no display image

without text tag

image

this actually is a big issue as we also use revision history with auto save, so not only is the data not visible but if the user tried to add anything all the data gets replaced

Joshuajrodrigues commented 1 year ago

Handling of custom elements can be defined with General HTML support. I'm not sure what you meant by the "text" element.

We have actually done this too, by default we are allowing all html with the regex exp for name, still we get nothing

Witoso commented 1 year ago

so for this we reached out to support and were notified that this feature is not available.

I would trust support engineers on that. Looks like a complex case.