Lurker News
Inspired by the design and UI/UX of apps like Notion, and utility of open-source apps like StackEdit, I decided to create a minimalistic, local-only WYSIWYG Markdown editor.

Some features worth highlighting:
- Monaco editor and Prettier integration for code snippets
- Tables (apparently the holy grail of WYSIWYG editing)
- Embeds (for CodePen, CodeSandbox and YouTube, most useful for HTML or JSON exports)
- Accepts Markdown paste-in, and "exports"/generates HTML, Markdown and JSON outputs
- Collaboration (with real-time awareness and initial commenting system, available only when logged in)
- GPT-3.5 integration (only when logged-in with the corresponding extension installed)
Stack used: TipTap, Solid.js, HocusPocus, Fastify, tRPC.
Some notable drawbacks:
- No mobile support
- Collaboration available only between signed-in users, in the same workspace;
- I tried my best to support most common Markdown formatting, pasting and in-editor shortcuts, though there might still be room for improvement
- Self-hosting isn't easy right now, though you should be able to figure it out from the source code
The editor itself is a standalone app, extracted from the larger Vrite CMS project (https://github.com/vriteio/vrite) which you can also test out (only with sign-in) here: https://app.vrite.io/

Comments (128) 31 threads

Brendinooo21 replies#
Congrats on building and shipping something!

That said, from the original document about Markdown[0]:
> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.
From my experience, the benefit of Markdown is that it eliminates the need for WYSIWYG, because WYSIWYG is awful to work with.
Put those two things together, and it's weird for me to see Markdown used like this. Not saying it's wrong or bad or whatever, just that it's weird and seems to cut against the spirit of the thing.
[0]: https://daringfireball.net/projects/markdown/

avgcorrection1 reply#
These Wysiwyg MD editors are either very popular to make or use though. I don’t know why.
sbjs#
Because I want to store my document's data in a standard text-only human-readable human-editable format, but be able to do the majority of my writing more easily and with wysiwyg which is an free, automatic and space-conservative preview.
arek_nawo1 reply#
I think there is use for good WYSIWYG-Markdown integration. Can't really speak for others but, when writing longer forms of content (technical blog posts, docs, etc.) Markdown becomes a bit more difficult for me to navigate. I always fallback to a visual editor (even if it's just StackEdit) and then try to somehow convert that content back to Markdown destination (which can sometimes be hard).

Vrite's primary format is JSON, but with MD shortcuts, parsing on paste and parsers converting JSON to MD, I think it integrates quite nicely in most cases.

chii#
> primary format is JSON

the primary format is prosemirror document format, rather than JSON (even tho it is in JSON).

zerkten#
I've wanted this when the primary requirement was a WYSIWYG editing experience acceptable to business users. Neither HTML nor Markdown were acceptable and while it's perhaps more accepted today, there are still huge audiences which won't touch anything looking like code. The options available generated terrible HTML on the backend that wouldn't roundtrip or resulted in problems when the overall site design was changed. I'm completely onboard with your feelings as a technical person.

Using Markdown as the storage format solved the problem because it is consistent and templates can easily be updated to support design updates. The problem is now finding a WYSIWYG editor that supports Markdown. I'm glad there is more going on this space, but StackOverflow helped me a lot with https://editor.stackoverflow.design/.

wouldbecouldbe3 replies#
Only some developers like markdown, the rest of the world just expect things to work like Word.

Things like this can bridge the gap.

lostlogin#
> work like Word

This instantly makes me think about spending 20 minutes trying to get a picture to stay where I put it and have text neatly formatted. Word peaked some time ago and I don’t even know what it is now.
The app? The online thing? The teams thing? They aren’t actually fully compatible and it’s awful.

Turing_Machine#
> work like Word.

I haven't used Word much for a while, but the first thing that came to mind here was "You mean like typing a comma and suddenly your picture moves 15 pages away?".
:-)
That said, this is pretty neat. I'm not wild about Monaco because it was crap on mobile the last time I looked (which has also admittedly been a while... at that time, anyway, CodeMirror was the only one I could find that didn't suck on mobile), but still, this appears to be a very worthy project for its use case.

reportgunner#
> ... rest of the world just expect things to work like Word

While having absolutely no idea how to actually use Word.

solarkraft#
> From my experience, the benefit of Markdown is that it eliminates the need for WYSIWYG, because WYSIWYG is awful to work with.

I can't tell you you're wrong because it's your experience, but ... mine is the opposite.
I don't like having to think about the markup, just show me what it looks like (no, not the "18px Arial #000 bold" kind, the "this is a headline" kind).
There are a few rich text editors, but they're all not very markdown compatible. But markdown is the format you almost always need for sharing and storing.

meesles2 replies#
StackEdit[0] pretty much perfected what I needed out of a markdown editor - I just need somewhere to write my tickets/docs that wasn't Github so that I could format it properly while writing. I still use it from time to time

[0]: https://stackedit.io/

Reitet001 reply#
StackEdit looks really nice! Does it support concurrent edits from several users? (as several etherpad-like services do)
meesles#
No I don't believe it supports collaboration, though I could be wrong. This is really a pretty notepad with great Markdown integration, nothing much more (which is why it's still good!)
pseudocomposer3 replies#
I think there’s a place for WYSIWYG Markdown, and actually, Markdown’s simplicity actually seems like a good opportunity to simplify WYSIWYG and make it mobile-friendly (this tool does not seem to be, so I’ve yet to try it…). In fact, most of us use WYSIWYG Markdown daily in apps like Slack without even thinking about it. That said, I think any general, open solution needs to offer “manual/WYSIWYG” toggles the same way we see “manual/preview” toggles on DockerHub/GitHub, ideally also maintaining cursor position. Markdown’s benefit is definitely its simplicity, but that doesn’t necessarily mean it obviates the utility of WYSIWYG editing.
vorpalhex2 replies#
I support a markdown WYSIWYG flow and it is a constant source of pain for our users. At this point I just tell our users to write markdown plain - and after a 10 minute tutorial, everyone is comfortable doing that.

Slack's "markdown" is horrifically broken and one of the worst markdown experiences in existence. I believe they no longer even refer to it as markdown since they have strayed so far from the spec.

StackOverlord1 reply#
Same problem with the comment box in Reddit.

Continue this thread — 1 reply

chatmasta#
> the worst markdown experiences in existence

This title belongs to ClickUp.

dadoomer#
You might like Joplin's approach. It's exactly what you described: you can toggle WYIWYG and plain text.
pavo-etc2 replies#
I love Obsidian's WYSIWYG implementation. It is WYSIWYG until you the cursor is touching any formatted element, at which point it reveals the Markdown that makes it appear that way e.g. h1 titles appear large, but clicking on them reveals the # at the start of the line
pxc#
Hybrids like this are a nice advance over WYSIWYG imo. There's similar, partial live preview functionality in LyX and Emacs' Org mode as well, and I love those.
specialist#
Sounds great. I couldn't (quickly) find any screenshots, so I might just download and try.

FWIW, WordPerfect's "reveal codes" feature remains my ideal solution.
Long before the advent of desktop publishing and GUIs and markup languages. Split screen horizontally, vs vertically side-by-side, with WordPerfect's own nomenclature for formatting attributes. Edit in either screen. Live cursor shown in both screens. Live updates back and forth.
Heaven.
I haven't used WordPerfect for decades, so my bias might just be nostalgia.

replwoacause#
I get what you’re saying, but if most people thought this way products like Obsidian would never be as successful as they are. If you look at what gets added to md documents to support all the different plugins in the community, it’s pretty crazy and a far cry from textbook markdown language.
eviks#
There is a way to publish a doc without looking like it's been marked up with tags - it's WYSIWYG, and it's by design impossible to achieve by... placing tags right there for everyone to see (though with some syntax highlighting you can make it less visible, bringing it closer to WYSIWYG again!

Markdown especially fails with anything remotely complicated like tables or even something trivial like font size/color

Continue this thread — 12 more replies

dbrgn2 replies#
Ah, the joys of contenteditable HTML elements... Such an under-specified and utterly horrible part of the web specs.

I'm sure you had a lot of fun fighting Safari in general, and also the diverging handling between Chromium and Firefox (for example when pressing the Enter key). Even just changing certain CSS properties on the root editor element will cause the resulting markup on certain key inputs to be different.
I admire that you pulled it off, and hope that you have a big collection of cross-browser integration tests for catching all the regressions that will inevitably happen :) Good luck!

twsted#
It uses Prosemirror, which is pretty well tested.
Turing_Machine1 reply#
Safari is actually much better than some when it comes to contenteditable. For one, Safari (along with Chrome, Edge, Android Webview, etc.) supports the plaintext-only attribute for contenteditable, which Firefox does not. That means you don't have to worry about getting some ugly blob of broken HTML pasted into your document.
dbrgn1 reply#
TIL abuot plaintext-only. Thank you, that's very useful.
Turing_Machine#
You're welcome. There are some minor inconsistencies (e.g., some browsers add a normal newline when one is pasted in, while others insert a
, which seems like broken behavior to me), but dealing with those inconsistencies is much easier than dealing with random chunks of HTML being pasted in.
jitl2 replies#
> We're sorry but Vrite currently doesn't support small viewports.

> Please resize your browser window or visit Vrite from a desktop browser.
:( although I get it. In my experience Android and to a lesser degree iOS input is the hardest part of building these kinds of editors.

arek_nawo2 replies#
Sorry for that. Forgot to include it in the drawbacks. I tried the editor as-is on iOS and it wasn't a good experience. All the menus (for blocks and inline) just mess with the OS's built-in menus and aren't good for touch. I'm working on a dedicated layout for mobile, though it'll likely only go so far. For mobile it's really difficult to create a compelling WYSIWYG editor on the Web.

Plus, for Vrite Editor, the Monaco Editor used for code snippets doesn't officially support mobile (and it's a hit or miss in my experience) so it'll likely have to be disabled there.

jitl1 reply#
CodeMirror (from the same author as ProseMirror the library under TipTap) works great on mobile, you should consider it over Monaco for that feature.
arek_nawo2 replies#
I know. I've explored pretty much all the options when working on this and Monaco and CM are definitely top choices. That said, for languages I'm working with (web) and for the future potential of e.g. connecting to remote language server, Monaco is a better choice. Will see if switching between CM on mobile and Monaco on desktop will be doable.

Continue this thread — 2 replies

Turing_Machine#
I don't think there's really any good solution for phones... text editing is probably always going to suck there. Maybe just try your best to get it working on tablets? CodeMirror (ProseMirror's sister project) works okay on iPads, in my experience.
paholg#
It even shows that message if I request the desktop site.

I don't care if it works well on mobile, just show render something so I can kind of play with it.

samwillis#
Nice, building with TipTap/ProseMirror is such a joy.

Not mentioned (but inferred from TipTap + HocusPocus, the guys that originally built both are awesome BTW) this is using the Yjs CRDT (conflict free replicated datatypes) library and its bindings to ProseMirror to provide the underlying realtime collaborative system. Again absolute joy to work with these tools.
This is one of my favourite stacks.

Load more comments