If all goes well, you won't notice that anything has changed yet and can carry on. But, we've swapped out our markdown editor and will unveil its new powers in stages.
As of this release, what you see when you click preview now is a WYSIWYG (think Google Docs) with editing disabled. In a very near future release, we will enable editing of what you see in preview, allowing you to format posts and comments, and do everything markdown wizards can do on SN, without any knowledge of markdown. At the same time, the existing markdown experience will not change, because @sox has triumphed and created a bidirectional should-be-lossless mapping from markdown to WYSIWYG and WYSIWYG to markdown.
Some of you will remember the wysiwyg experiment I teased years ago. The reception for that was so poor that other bitcoin founders were sending me condolences via DMs and we shelved it. At the time, I didn't realize that nearly all hybrid markdown-wysiwyg systems suck, and my editor sucked, because they have unreliable mappings from one format to another (typically relying on regex and other kludge). In our research, we found that literally all hybrid markdown-wysiwyg systems, even multi-billion dollar reddit's and ones that do wysiwyg to markdown well, cannot map reliably in both directions. @sox made an editor that does.
What this will mean soon is that you can write something in markdown on SN, switch to the WYSIWYG and see how your post will look, edit it in the WYSIWYG, then switch back and see all the WYSIWYG changes in the markdown, edit the markdown, and so on. While many of us will continue to write markdown, there are things like tables that are more comfortable to create in a WYSIWYG and features like image size and alignment that markdown doesn't have a clear standard for. This editor will also allow us to add lots of nonstandard SN-specific features to posts and comments (at the fancy end you can imagine widgets) without requiring stackers read documentation.[1] And, with markdown still first class, if we ever do anything tasteless with our WYSIWYG, you can simply use markdown instead.
Anyway, as I said, you won't notice that much has changed yet and can carry on. But, I'm super excited about this new editor and solving a problem that's been haunting me for years.
Sox and I will be standing by to fix any bugs you find. Also, No Trust November is slated for release tomorrow (after I do the newsletter to not mess with anyone's expectation of being a top post).
This is also a huge win for SN's developers because a reliable mapping between formats means that storing posts and comments in either format allows us to generate the other. More specifically, we can store all posts and comments in SN flavored markdown yet display them with features you only expect to see in rich text. ↩
@k00b and @sox , take a look at #1357566
This string appears to be getting intrupted strangely:
$88.8 million and Mastercard about $78.7 million
When I am in the write tab it looks fine but when on the preview table it is different
about $88.8 million and Mastercard about $78.7 millionThe editor thought you were writing a formula lol
Anyway, probably you should escape the
$dollar sign, but more importantly maybe we should only support double dollar signs ($$).$test$
test
$test
$test $test
$test$test
... yeah, definitely make it so that only
$$starts a latex environmentalignright$ 🤔🤭
Alignments will come in a later stage! Unless you mean LaTeX alignments, they should work iirc.
Pushed 🫡
Fixed!
I'm personally shaking because what you're reading right now is the product of hand-made Markdown mapping. This is completely new.
Feel free to mention me wherever you find inconsistencies, bugs, whatever!
This is a huge day for writers, and I can't wait to let you try what we're now capable of doing.
Thanks @sox 🫡
The next stages are going to be fun!
Nice work!
I don't understand the footnote. Don't you already store all posts and comments in their raw markdown and display them fully rendered?
Yes, it's a weird point to make. The main thing is that most systems that allow rich text editing do not store the result as markdown (because it's lossy), and instead store html/json.
Also
Ah, yeah, that's what I figured after writing my post: your reversible markdown renderer lets people create in WYSIWYG mode, but still let you store it as markdown.
I think @siggy47 uses it too!
Ah nice! I wish more people to use it
This editor now speaks AST!
translation from italian: abstract syntax tree
Christmas comes 6 days early! I'm very excited about this.
My respect for @sox increases to new heights. Most impressive.
Is it possible that links in comments made using the new editor do not go to
target="_blank"or whatever the cool kids use for that nowadays?oops D:
wip https://github.com/stackernews/stacker.news/pull/2681
Great work!
does this work on mobile?
why wouldn't it? :P
if you're referring to wysiwyg capabilities, that's gonna come in a later stage.
Yeah I don‘t see a wysiwyg button to push
there isn't one yet
`preview' is an uneditable wysiwyg that we will make editable in a future release
Thanks for clearing that up
We're fragmenting the new editor in various stages, this allowed us to focus on some really important details, like this new bi-directional engine that's creating my words!
I understand now
Will you open source it?
SN is FOSS my dude: https://github.com/stackernews/stacker.news
Legends!!
in its early stages, it works, will insanely document it yes, it clipped