-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
From 4 to 5 Problems #664
Comments
CKEditor 5 is much different than CKEditor 4 - architecturally and conceptually. As you may know, CKE5 features custom data model. Data that is loaded in the editor is stored as custom elements in that data model tree. Then, that data model is translated to semantically correct HTML. We want to provide an editor that will be easily extensible by 3rd party plugins and that will produce semantically correct content in a nice and easy way. Providing abstract data model that is rendered to view is the only way to ensure that we can provide cutting-edge software. Because of CKE5 architecture, the content set in editor has to be recognized by the editor. Since The image feature of CKE5 produces Of course, there is a possibility to provide a plugin/feature, that will introduce converters, which will convert all the unrecognized tags and attributes to the model on a 1-to-1 basis (and then convert it back to HTML, of course). This is not, however, something we are looking forward to introducing. CKEditor5 is supposed to be rather a content editor, than HTML editor. We are aware that requests like yours will show, because many use CKEditor4 as WYSIWYG HTML editor. More on our approach can be read here: #592 (comment) |
This means that you need a quite different feature than the one which CKEditor 5 provides, as @scofalik wrote or that you can process the content after retrieving it from the editor. CKEditor produces a semantical, optimised HTML in a standard and completely predictable way. This is the best format for storing this data and for processing it later, before sending it to the users. Different channels (email, RSS, web, small devices, etc) may require some tweaks. There's no problem with parsing this HTML using any of the available parsers, modifying this tree to fit your usecase and stringifying it back to an HTML string. That's how advanced CMS (like Drupal) handle serving the content for multiple channels. |
Yes, I understood. The 5 edition introduces a data model to reflect the dom structure. Anyway, can you not stop developing the 4 edition? Because I think many developers are used to make ckeditor as an wysiwyg editor. For example, such features are preferred:
|
I think you as a user, can not demand this. Ckeditor maintainers have the right to stop the development of v4 if they so wish. I think, anyone who wants to continue using v4, when v5 is stable enough to replace v4, should pay for it. ( I'm included in that. ) I have been following the development of ckedito 5 for a long time, and I believe it is the right way. I hope at some point, to be able to migrate to ckeditor 5 (and implement something similar to google docs writter with ckeditor 5, to be used within my organization.) |
@liyincheng, we'll continue working on CKEditor 4 for now but we understand that CKEditor 5 is its natural successor. We don't see reasonable limitations for this to not happen. Some of the perceived limitations that developers are identifying right now are mainly related to the fact that they were used to things in a certain way with v4 and now it must be done differently in v5. There is not much limitation really, but it requires more attention to the editor itself, by developing plugins to satisfy all specific cases. The point is that, in v5, things don't work in the editor just "by case". For example, throwing whichever HTML into it without having a feature developed to support that HTML is not an option. Something similar has already been discussed in #592. I recommend you to check that thread. |
Feature request
The API editor.insertHtml is gone from CKEditor 5,so what if I want to insert multiple html tags? As far as I know, the only insert method is:
editor.data.insertContent(item, selection)
Should I instanced all the html tag to corresponding ckeditor Element?
Is there similar API like ckeditor 4 provided ?
Bug report
When I want to insert such html:
editor.setData('<a style="display:block"><img src="xxx" style="width:200px"></a>')
The generated html is:
<figure><img src="xxx"></figure>
As you can see, the A tag is missing, the img style is gone and it add a figure tag. So why it drops my a tag and I don't want a figure tag, because I used this editor as an email editor so the figure tag is not well surpported by the email client.
The new concept of ckeditor 5 is exciting, but the basic functionarity which 5 edition provided is missing and there very few documentation or Q&A for 5 edition. Thus, I feel difficult to make it work supporting may custom features.
I may want to use ckeditor 4 back if problems could not be solved.
The text was updated successfully, but these errors were encountered: