Hacker News new | ask | show | jobs
by trueadm 1522 days ago
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.

2 comments

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