-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Slatejs: Wysiwyg editor #2828
Comments
The default HTML editor should not have any fancy settings. It's the "default", and it's implementation might change overtime. If we want to add options that are specific to an implementation, like slate, then it should be in another editor with custom options. And it's fine to use the same plugin for two different editors. |
@agriffard @sebastienros Slate looks nice but it looks like slatejs is using React as a dependency. Thoughts on importing another dependency... are you ok with that? |
We don't mind mixing dependencies. I see each part as an independent component. If we had a choice I would agree not to have to many. Also in this case it's slate that needs it, it should not impact our own code. What do other people think? Does anyone have a better solution? Also let's ensure this solves your issues first. |
From what I can see it has it's advantages and disadvantages... it's very vanilla which personally I love because IMHO nobody should be assigning fonts and colours in a CMS. This is a content tool, not a presentation tool at this point. So for me, I like that OOTB it pretty much limits the user to bold, headings, lists etc and the approach seems to prevent DOM issues in the resulting markup. This might not be other people's cup of tea though which is why I guess people allow colour and font selection in a WYSIWYG editor. It looks though that it serialises to JSON and in order to serialise to HTML we might need to write our own code. Take a read of this:https://medium.com/@yurkaninryan/lessons-from-a-year-of-wysiwyg-915135ec846e If my assumption is correct, although it looks like a powerful editor from which to allow flexible customisations, is it too limited in what it can do straight out of the box? |
If we need to construct the HTML, that would be part of the editor (to store some clean HTML when the editor gets the json document). But it makes sense actually that it works with a json representation, and HTML is just a view of that. I assume that's how it could also be used to generate markdown. I don't think a simple editor would be hard to configure based on their examples. |
Adding another potential replacement wysiwyg editor: https://editorjs.io/ Not super familiar with it but looks decent on first glance. |
Another one : https://ory-editor.aeneas.io/ |
there is also roosterjs which is the control that Microsoft use in Azure DevOps (and I think in other palaces) |
Consider using this editor:
https://www.slatejs.org
https://github.com/ianstormtaylor/slate
https://www.npmjs.com/package/slate
Allow in the Content Type Definition to manage the configuration: toolbar, buttons, ...
The text was updated successfully, but these errors were encountered: