4 ms·
FWIW, the editor they use, at least on the web, seems to be https://github.com/quilljs/quill https://github.com/quilljs/quill. I'm guessing Slack implemented s
by cben 7y ago
FWIW, the editor they use, at least on the web, seems to be https://github.com/quilljs/quill https://github.com/quilljs/quill.
I'm guessing Slack implemented something a-la https://github.com/patleeman/quill-markdown-shortcuts https://github.com/patleeman/quill-markdown-shortcuts, but not very well...
In general the model of allowing separate positions for cursor inside vs outside a span is a huge improvements over WYSIWYG assigning "sticky formatting" to characters.
(Hat tip to TeXmacs which was maybe first time I've met that UI pattern.)
But you have to do it consistently. E.g. end of literal block has separate inside/outside but start doesn't.
(Of course, in source editing, it comes for free – formatting is delimited by characters like * or ` and cursor is clearly before or after the delimeter.)
----
I believe there is a saner middle ground — formatting as syntax highlighting. You're still editing the source, no hidden state, just immediate in-place feedback.
(Nowdays some call this "WYSIWYM" though it's not exactly same)
Examples:
https://stackedit.io/ https://stackedit.io/, https://codemirror.net/demo/variableheight.html https://codemirror.net/demo/variableheight.html,
https://simplemde.com/ https://simplemde.com/,
https://laobubu.net/HyperMD https://laobubu.net/HyperMD (the latter is borderline, hides too many formatting chars IMHO, but does reveal them when you move cursor to edit.)