GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

[QUESTION] Do you have plans to remove dependency on Document.execCommand in RTE? #2853

Closed mikeholczer closed 4 years ago

mikeholczer commented 4 years ago

I noticed that in https://github.com/artf/grapesjs/issues/74 when the move to the Pell based editor is listed it's use of Document.execCommand was mentioned as a liability. I see now that according to https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand it's consider Obsolete, so we were wondering if you have plans to switch to a new editor?

artf commented 4 years ago

so we were wondering if you have plans to switch to a new editor?

New editor? What would be the alternative?

mikeholczer commented 4 years ago

What additional information are you looking for? I did a quick google and found https://quilljs.com/ doing a quick search of it's source on github, the only use of execCommand I see is https://github.com/quilljs/quill/blob/fd400525d551315b6fa9a4d4783e1c7dbad57827/formats/image.js#L32 which sounds like minimal impact.

artf commented 4 years ago

No, I mean a native alternative

mikeholczer commented 4 years ago

Why does it need to be a native solution? That account also has a lower level system in https://github.com/quilljs/parchment which is what they used to implement the editor.

artf commented 4 years ago

I'd like to avoid putting external libraries in the core library (indeed we still have to extract some of them). If you need quilljs you can try to add it as a custom RTE. I close it as there is no real alternative to the native API (unfortunately)