WYSIWYG editor - difficult to develop?

I’m not a tech guy, just curious are this kind of editor hard to develop? It seems like pretty old tech and many markdown editors are nailed. (saw in roadmap as long-term project)

1 Like

Just conjecture: my guess is that it isn’t so much that doing any WYSIWYG editor is hard—it’s that designing one that fits Obsidian effectively is non-trivial.

This may be a good place for Pareto’s principle. An 80%-polished editor is likely pretty easy. Developing the last 20% of fit and finish to suit Obsidian’s unique features and style is probably the hard part.

5 Likes

Could this be implemented by mixing markdown-source-view and markdown-preview-view so the active line is displayed with markdown-source-view and all other lines are displayed with markdown-preview-view? I think this could be accomplished by mixing the two in the structure and applying display: none to the version that is currently not in use (for all lines, markdown-source-view would be set to not display, except for the active line).

This would be partial WYSIWYG - all lines in the document would be rendered as preview except for the line we are currently working on which would be rendered as source. But as I recall from a poll on the discord server, this is the version of WYSIWYG most people were interested in.

3 Likes

long-term in Obsidian doesn’t seem likely to be long-term as usually expected.

I’d regard a half-baked wysiwyg as a mistake, even with the intention to improve later. Developers have already intimated they’d like it to be something like Typora and it’s best to avoid a reputation for less than that.

4 Likes

@death.au had this idea at one point. Personally I think it’s too hacky, there’s lots of things under the hood that probably won’t work in a solution like this, e.g. selection, undo/redo history, etc.

Also like you said it’s partial – for example I don’t think people expect all inline LaTeX to get expanded to source when you start editing a paragraph. The polish of something like that wouldn’t match the rest of Obsidian, unfortunately, so we don’t plan to do something half-baked.

4 Likes

While I am looking forward to a WYSIWYG mode, I appreciate the devs approach of taking time to get it right. There are too many bad open source markdown editors because it is easy to hack something together. Obsidian is a writing and reading tool, so this part should be given real effort IMHO - people will spend countless hours in it. Designing WYSIWYG ‘from scratch’ will also hopefully allow much tighter plugin api integration.

4 Likes

Just for the record, Silver did a poll in early May, I only just found out about it and voted for an option.

Could this be implemented by mixing markdown-source-view and markdown-preview-view so the active line is displayed with markdown-source-view and all other lines are displayed with markdown-preview-view? I think this could be accomplished by mixing the two in the structure and applying display: none to the version that is currently not in use (for all lines, markdown-source-view would be set to not display, except for the active line).

I’d say the active paragraph should be shown in markdown, as it will provide more context while editing. Or a simple WYSIWYG editor a la Trilium Notes is enough i.e. the ability to edit the text while previewing it. One can always revert to the MD editor if he wants.