简体   繁体   中英

Any rich text editor that edits html “As It Is”?

I'm having a hard time finding a good WYSIWYG editor, tried CKeditor & TinyMCE and found out that they strip out a lot of tags and headers and they ruin the page.

Any recommendations of professional editors? i want it to leave the page as it is but only change the areas that people "touched".

Thanks

TinyMCE and other editors as-default usually do some level of clean up.

For example with TinyMCE there are configuration options such as cleanup and clean up on startup which can be used to control the cleanup actions.

tinyMCE.init({
    ...
    cleanup : false
});

Documentation as taken from TinyMCE wiki:

This option enables or disables the built-in clean up functionality. TinyMCE is equipped with powerful clean up functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated.

This option is set to true by default , but if you want to disable it you may set it to false .

Notice: It's not recommended to disable this feature. It might be worth mentioning that the browser usually messes with the HTML. The clean up not only fixes several problems with the browsers' parsed HTML document, like paths etc., it also makes sure it is a correct XHTML document, with all tags closed, the " at the right places, and things like that.

我以前从未见过这样的东西,但正在考虑尝试创建这样的东西

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM