Skip to main content
11 events
when toggle format what by license comment
Jul 12, 2022 at 14:16 comment added Yaakov Ellis StaffMod This was completed in release Alpha 2
Jul 12, 2022 at 14:15 history edited Yaakov EllisStaffMod CC BY-SA 4.0
completed in release Alpha 2
Mar 15, 2021 at 20:27 history edited Ben KellyStaffMod CC BY-SA 4.0
added 87 characters in body
Feb 10, 2021 at 14:06 comment added Sebastian Simon @StephenOstermiller There already is a hidden textarea that contains the raw Markdown. Even then, the Markdown could simply be stored in a string — no need to use HTML at all.
Feb 10, 2021 at 11:54 comment added Stephen Ostermiller It seems to be implemented such that switching the editor mode immediately discards the contents in the other editor. A lot of this pain could be avoided if the other editor was simply hidden instead. It only needs to be discarded if an edit is made in the visible editor. If no edits are made, you could re-show the hidden editor and it would be guaranteed to be non-destructive.
Feb 4, 2021 at 1:39 comment added Paramanand Singh @user: I doubt if that kind of architecture can be implemented. Markdown is plaintext so the editing part is simple and implementing preview is tough. For rich text the editing is tough and I guess some form of compilation goes on to convert from the internal rich text representation to markdown. But expecting the compiled markdown to match a natively written markdown will be difficult.
Feb 1, 2021 at 19:31 comment added Noah Snyder In practice, this is why I’ll likely end up just using post as my “preview”, since you can always make edits after posting.
Jan 30, 2021 at 21:55 comment added user @BenKelly: Then it seems that there's something wrong with the editor architecture. Source markdown text should be the single source of truth. And the rich text editor should be built on top of it, it should not have its own internal model that doesn't map to source text 1:1 (with all its spacing and formatting variations). Switching editor must be non-destructive always, since 1) it's going to be used as preview, 2) editing posts in editor that were written in md and vice versa will introduce source differences and ugly diffs otherwise
Jan 29, 2021 at 21:45 history edited Ben KellyStaffMod CC BY-SA 4.0
added 21 characters in body
Jan 29, 2021 at 21:45 comment added Ben Kelly StaffMod It is definitely the final intent for toggling back/forth to be a relatively non-destructive action (for the vast majority of cases). However, this is a lot harder than it may seem. We have a lot of these cases laid out in our automated testing suite, with a number of them currently failing. Every time we come across a new edge case, we add a unit test ;). We're working to close the gap, but there's still quite a bit of work left to do so. Thanks for the suggestion!
Jan 28, 2021 at 2:50 history answered Ryan M CC BY-SA 4.0