Skip to main content
8 events
when toggle format what by license comment
Feb 18, 2021 at 14:10 comment added Polygnome @Dan Thats actually not that hard of a problem, many editors e.g. Overleaf can already do it. StackEdit.io has Scroll Sync, which also syncs positions between Markdown and Rich Text. Keeping caret position is actually easier than scroll sync...
Feb 18, 2021 at 13:04 comment added Dan @StephenOstermiller I don't think setting/viewing the caret position is the hard part. It's making the editor know that the previous position before switching to markdown at character index X is now at character index Y due to the changes done in the markdown editor, for example. Especially since the changes in characters aren't 1:1 between richtext mode and markdown mode.
Feb 10, 2021 at 11:44 comment added Stephen Ostermiller I'm sure why this is "hard." JavaScript has the ability to view and set caret position. stackoverflow.com/questions/512528/…
Feb 10, 2021 at 11:34 comment added Stephen Ostermiller This makes rich-text mode next to useless as a markdown preview. I'd be OK with not having a live markdown preview if clicking the rich checkbox and then unchecking it was non-destructive, including keeping your cursor position.
Jan 27, 2021 at 23:21 history edited Ben KellyStaffMod CC BY-SA 4.0
added 22 characters in body
Jan 27, 2021 at 23:20 comment added Ben Kelly StaffMod To echo Catija's statement, this is a fairly hard problem to solve, so we decided to focus our efforts elsewhere for the initial release. This is something that I hope to solve in the future, though.
Jan 27, 2021 at 13:07 comment added Catija StaffMod This is explicitly mentioned in the question. Building it so that it remembers cursor location, from what I understand, is not a simple thing, so it was intentionally omitted.
Jan 27, 2021 at 11:57 history answered Polygnome CC BY-SA 4.0