Open DarrenSem opened 6 months ago
I made a Bookmarklet, which will insert the required HTML and CSS and JavaScript (and will also redirect to MarkdownLivePreview.com if not on that page).
I also made it re-center the splitter if you double-click it.
https://gist.github.com/DarrenSem/795d8bb43687b6c771780d74542822cd
Feel free to use or adapt the code above for the main repo or your own forks.
Sometimes I find the "editor" div a bit distracting after I paste in the MarkDown contents, so I wrote some CSS and JS to add a new "Toggle Editor" link to the top button bar, along with a green vertical bar in the middle of the 2 divs that you can drag-resize left or right.
I have only tried this in Chrome on desktop, not yet tested this in mobile etc. But for my needs it works well, I am quite happy with it.
Extra HTML: (added "toggleButton" next to "Copy" button, and added "resizer" div between "edit" and "preview")
Extra CSS:
Extra JavaScript:
NOTE: some of the CSS is the result of some back-and-forth tweaking via ChatGPT, so I'm not sure if they are the best way or might cause problems and/or the comments are even accurate, but again it seems to work #GoodEnough for my needs.
HTH!