4 ms·
I'm not convinced. What you're talking about sounds an awful lot like MS Word. It has a document model. It has a renderer for said document model. The document
by eslaught 4y ago
I'm not convinced.
What you're talking about sounds an awful lot like MS Word. It has a document model. It has a renderer for said document model. The document model even has first-class abstractions (Word templates). You can directly edit the rendered representation. And it has a mode to show (at least certain kinds of) markup directly in the rendered document.
But the thing that all binary formats share is a lack of transparency. When I have a text file with, say, Markdown formatting, I know I'm seeing 100% of the formatting. Because the irony of not having a "code view" / "presentation view" split is that I'm never 100% sure what I'm actually looking at. Even in "regular" documents, I find that this can matter (especially when you're using Word templates and you want to do some sort of a global format change—it really matters what formatting you've applied to the document and not just what the current rendered output looks like). In documents like HTML that need to be processed in one of a variety of ways, this matters even more. I frankly cannot imagine a solution in which you do the sorts of sophisticated transformations people routinely do with HTML without caring very deeply about what "code" gets generated.
If I'm not mistaken, predecessors to MS Word actually had a code mode, with a corresponding input language to control it. All of those solutions died off, at least in terms of being popular in the long term.
- nyanpasu64 4y agoThe biggest properties of HTML/Word I prefer over Markdown is that pasting/typing special characters like [] or backslashes into the graphical editor won't break formatting, and there's a standardized format with unambiguous rules to parse content so every receiving application interprets it identically. The biggest properties of Markdown I prefer is that (like HTML) it has first-class semantic code and block and blockquote sections (Google Docs only allows changing the font, unsure if MS Word has a semantic system), copying text between documents preserves meaning but not mismatched fonts/sizes/colors, and you can universally copy-paste it between apps, read it in a text editor if necessary, and diff/merge it textually. I think there's a local optimum of markup editors, with semantic HTML as a syntax, and a graphical editor which offers code blocks and tables, but does not inject presentational tags like fonts and sizes (and optionally colors) into the document being edited and saved. I think this should satisfy most of the points I want, though it's worse than Markdown at universal semantic copy-paste, reading as plaintext, and diffing/merging. Unfortunately Qt's QTextDocument converts semantic HTML into presentational. On the other hand CKEditor (sadly JS, an example at https://pinouts.ru/edit_page.php?file=mini_pcie&lang=eng https://pinouts.ru/edit_page.php?file=mini_pcie&lang=eng) looks promising since the editor exposes semantic tags directly on the UI, though I haven't spent much time researching.