Git Product home page Git Product logo

gem's Introduction

Dark black card with sample white text illustrating basic markup

Gem (previously called Editor) is a performant and simple plain text editor, created with Prosemirror. The design is very inpsired by Paco Coursey's "Writer".

The goods:

  • Fairly lightweight, around 65.5 kB for the whole website.
    • Can do a fair bit better here...some of the prosemirror modules can be stripped for this purpose.
  • Undo/redo.
  • Arrow key movement.
  • Basic inline markdown (bold, code, italic), although they can be a little buggy.
  • JS source is small and readable.
  • CSS source is small and readable. Uses CSS variables for styling.
  • Accessible and semantic. Each paragraph becomes a p tag, each inline style is appropriately represented.
  • Playful animated cursor :)

To run: npm run dev. The build step uses estrella to bundle/watch and serve for serving.

Please hit me up on twitter if you like it or have any ideas for features!

To do (in priority):

  • Switch to using codemirror so that syntax highlighting becomes easier to dispatch
  • Basic markdown syntax highlighting.
    • Headings
    • Bullet lists
    • Numbered lists
    • Code block
  • Code block syntax highlighting (async loading through prismjs?)
  • Cursor shape changes when marks are applied (fatter when bold, slant when italic, rectangle when code)
  • Default word-selection (when you start highlighting, it defaults to selecting the whole word your cursor is on).
  • Fix sentence-wrapping bug where it overflows sometimes (unreproducible as of yet, unless you paste in a huge text).
  • Highlight and animate selection through 3 divs: one on bottom to beginning of line, one sandwiched in b/w, and one from top to end of line
  • "Bookmarks" to leave your cursor in a position and travel back to.

Things I'm thinking of adding:

  • Table of contents generated from the headings for easy navigation?
  • Tree-sitter for incremental markdown parsing? Prosemirror plugin to wrap the wasm bundle?
  • Allow theming/setting the color variables in UI?
  • Potentially replace prosemirror-view to be more lightweight and integrate cursor and selection "natively"?
  • Share urls to save?

gem's People

Contributors

colelawrence avatar tanishqkancharla avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.