Hacker News new | ask | show | jobs
by vsroy 1523 days ago
Let's say I'm building a stack overflow style editor (you type markdown and it gets rendered in a preview tab) -- would there be any reason to use lexical?
1 comments

Yeah, you could easily do that. We do the exactly that right now for Workplace.

You could also roll with a `<textarea>` but that can be limiting if you want additional functionality further on down the line – such as mentions or inline markdown shortcuts.

When you say inline markdown shortcut, is an example of that pressing Ctrl-B on some highlighted text in order to surround it with asterisks?

And is the idea of mentions that we can use Lexical to provide nice things like pop-up auto-complete of a username / automatically transform the username into a link inside of the input text?

Another follow-up question: Do you think Lexical would be a good fit for a "live preview" type editor?

Live preview = the editor is WYSIWYG but the storage format is Markdow

Example: https://help.obsidian.md/Live+preview+update