froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.27k stars 673 forks source link

Froala wysiwyg editor not support XHTML #1095

Closed NTMan closed 8 years ago

NTMan commented 8 years ago

Demonstration: http://froala.sy24.ru/

Error occurred inside jquery code when you try innerHTML this &<>"'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦

Because in XHTML not allowed HTML entity please use code instead https://dev.w3.org/html5/html-author/charref

For example   have valid   code.

stefanneculai commented 8 years ago

No, the editor is not designed to support XTHML, but only HTML5.

NTMan commented 8 years ago

HTML5 does not mean inability layout into XML. If you see example used doctype is <!DOCTYPE html> The only difference in the file extension xhtml written instead of html and the server sends header Content-type: application/xhtml+xml; charset=utf-8 instead Content-type: text/html; charset=utf-8

stefanneculai commented 8 years ago

Thanks for the feedback, really appreciate it. However, it's not only that, but the editor output is not designed to be XHTML compatible. E.g.: the editor will output <br>, not <br/>. We have had request for XHTML before and if we're going to add it, then we'll make this change as well.

Anyway, if you want to use entity code instead, you could do that very handy by changing the entities option.

NTMan commented 8 years ago

Thanks, after disabling entities plugin error message which show in console before is gone, but editor still not working, pity.

NTMan commented 8 years ago

I would like to debug the code. Is it possible to get a version that does not suppressed errors. in the console everything is clean and the editor does not work.