Closed bobwoofix closed 3 months ago
We have incorporated SunEditor in PrimeFaces Extensions and missing this ability to not touch the HTML is the biggest complaint have gotten so far about SunEditor: https://www.primefaces.org/showcase-ext/sections/sunEditor/basicUsage.jsf
Any plans here? Without such option this Editor is completely useless.
It is designed that way to process formats such as images and tables. If everything is done in free form, it is difficult to select or edit images or etc. This is my lack of skill. In version 3.0.0, I modifying it so that users can select it step by step.
Before updating to version 3.0.0, I will add 'strictMode' to the next version to prevent HTML clean-related tasks.
And you can temporarily disable it as follows:
editorInstance.core.cleanHTML = function (html) {return html;}
editorInstance.core.convertContentsForEditor = function (html) {console.log(html);return html;}
awesome @JiHong88 !!!
Thanks heaps for your help with this -- let me know if I can assist in some way.
BTW what version do these functions work on? -- and what do they do?
It is version 2. It is difficult to change many things in the current version. I'll simply added an option that does not force the HTML format to be modified.
Version 3 is currently under development and is almost complete. https://github.com/JiHong88/suneditor/tree/version/3
Seriously, there should be a 'Don't F**k with My HTML' option. I don't understand why so much of the HTML is being changed, deleted or wrapped with some custom tags.