3 ms·
It's really all the same, HTML is already a component-based system but the parsing and tooling for it is poor when used through javascript. Maybe WebAssembly wi
by manigandham 9y ago
It's really all the same, HTML is already a component-based system but the parsing and tooling for it is poor when used through javascript. Maybe WebAssembly will change that but using a content-block approach is definitely a way to get around some of the complexity. Medium's editor uses a similar approach, probably the most common and there's Mobiledoc which is a standardized JSON format and editor framework: https://bustle.github.io/mobiledoc-kit/demo/ https://bustle.github.io/mobiledoc-kit/demo/
Side note, list of various editors: https://gist.github.com/manigandham/65543a0bc2bf7006a487 https://gist.github.com/manigandham/65543a0bc2bf7006a487
- jordanlev 9y agoI do a ton of work with CMS's, building sites for non-technical clients who manage their site without much knowledge of HTML, CSS, or any coding/encoding (even markdown would be a bit much for some of my users). The big win that you get with a block-based system (as opposed to 1 big chunk of HTML) is that it allows us to build out the content editing interface in a way that is very "guided" for the user... like, if there is a photo gallyer, we have a repeating list of slides and they have fields for a photo and a caption. Then on the front-end we can build our HTML+CSS markup around those specific fields. You can't do that easily with 1 big chunk of HTML.
- manigandham 9y agoRight, that's what I mean about HTML tooling. It's a fine data format but DOM manipulation isn't very good compared to a JSON data structure with native integration into javascript and more universal parsing ability. The mobiledoc format is a good start at standardization.