7 votes

Rich Markdown Editor Userscript for Tildes

Some of the discussion in another thread inspired me to try making a user-script that would inject some rich text editor into the tildes desktop site. I have only tried it on Firefox, but figured it might be worth sharing in case anyone finds it useful or has suggestions for improvements.

Install Tampermonkey extension. (Chrome, Firefox).

With the extension installed, this link should be detected as an installable userscript.

https://gist.github.com/allemangD/faf9bb796aad686593404a76b0e372c6/raw/073ca80d9dddc231e3f41c24c1989e8a40b7c243/tildes-easymde.user.js

@ some people who directly said they want a better editor in that thread.

@Eji1700 @arctanh @smoontjes


It injects EasyMDE with some extra css to make it match the Tildes theme. EasyMDE uses FontAwesome for its toolbar icons, but Tildes's content policy seems to make it impossible to use this. Instead, I add some CSS to put plain text in the toolbar buttons. Some nice features

  • Full-screen and side-by-side editors.
  • Spell checker.
  • Auto-save. (Based on the URL and element ID, so each comment reply is saved separately.)
  • Keyboard shortcuts like Ctrl+B, Ctrl+K, etc.
  • Conveniences like "enter" on a list adds an item to the list, or in a quote adds a line to the quote.

It is not perfect, however. It bugs out if you pick the built-in "preview" tab (the editor is still visible but does not update the preview), and it does not understand username mentions or group mentions.

I used it to write this, and the auto-save behavior seems to be fine, but I'm not sure how much I trust it not to lose my work.

Screenshots!

2 comments

  1. [2]
    synergy-unsterile
    Link
    Added to the Customizing Tildes wiki page.

    Added to the Customizing Tildes wiki page.

    1 vote
    1. TangibleLight
      Link Parent
      Thanks! I always forget about the wiki. There's a lot of good stuff on that page.

      Thanks! I always forget about the wiki. There's a lot of good stuff on that page.

      1 vote