3 ms·
XML per se is great for storing tree like structures. However, it's not actually XML that's bad, but content editable, which is what most editors were using unt
by chii 8y ago
XML per se is great for storing tree like structures. However, it's not actually XML that's bad, but content editable, which is what most editors were using until recently.
In content editable, the visual information is not one to one transferable to a single html document, which, in turn, means not transferable to a single XML representation (and in all likelihood, the html is what is used as the representation, not a transformed XML document).
With Json representation , the content editable method is no longer the path of least resistance. Building out a proper renderer (whether in canvas or dom) means you end up removing most of the content editable issues.
- cryptonector 8y agoJSON is harder to edit manually, honestly. Don't do it. Use an editor that supports editing the format.
- ZenPsycho 8y agoNobody is talking about editing the JSON directly. They are talking about programming a wysiwyg editor to the JSON data model.
- cryptonector 8y agoI would say XML vs JSON makes little difference to the complexity of an application (e.g., an editor) using it.
- deleted 8y ago[deleted]
- ZenPsycho 8y agomanipulating JSON (really, just plain native language objects) is way more straightforward than manipulating the XML dom. The purpose of formats like this is to make inexpressible the kinds of documents that result in difficult to untangle bugs, and frustrating UI behaviour. See this article about how Medium's editor was designed for some essential background of the motivation for this JSON format https://medium.engineering/why-contenteditable-is-terrible-122d8a40e480 https://medium.engineering/why-contenteditable-is-terrible-1...
- deleted 8y ago[deleted]
- fourneau 8y agoUntil recently? What are most editors using now?
- zmix 8y ago"contenteditable" is an HTML5 (!) attribute defined by the XML hating HTML5 group. Right?