Paste Browser encryption, Syntax highlighting and oher updates

contents (3)

This post covers the recent updates made to paste.collectiveness.de.

Browser encryption#

Pastes can now be encrypted in the browser before being sent to the backend

  • Added an encrypt in browser option
  • The encryption key is stored in the URL hash (#k=...) (the backend does not receive plaintext or key)
  • Opening an encrypted paste without a key shows an input field to enter it manually

Viewer and syntax highlighting#

  • Added token based syntax highlighting with line numbers and a line wrap toggle
  • clicking a line number links to it. shift+click highlights and links a range of lines and scrolls to it on load
  • Markdown pastes (.md) now have a toggle between source and rendered views
  • Added fork to copy the viewed paste into the create form as well as copy and download buttons

Other changes#

  • Added drag & drop uploads to the editor (up to 1 MiB) (automatically fills in the title and lang extension when empty)
  • Added a tab key: indent/focus toggle and a size and line counter above the editor
  • Added custom ID availability checks while typing
  • Pastes created in the browser are now stored locally in localStorage (in the browser) (up to 40 entries!)
  • Fixed whitespace trimming when updating pastes
  • Opening an already viewed paste in manage no longer increases view count