Hacker News new | ask | show | jobs
Show HN: Writing a simple, event-driven, extensible, rich text editor framework (github.com)
4 points by simplygreatwork 1905 days ago
2 comments

I've researched and dabbled with most existing rich text editor projects for the web. I know that around one hundred projects exist for rich text editing for the web but I still feel compelled to start my own project. It's a simple, extensible, hackable, event-driven rich text editor for the web and it's a work in progress. It's built around a message bus and currently uses the DOM as the model. It doesn't currently support collaboration. I'm posting this message in case anyone feels like testing or hacking new features. Currently only tested in Chrome. MIT licensed. Thanks for taking the time to read or review!
Cool project. Would love to see some commonly requested feature examples, such as autocomplete (for tagging, mentions)

On a related note, I think biggest contender in this area is prosemirror but for the most people its api feels too low level-y. A more opinionated framework built on top of it with the support of common features would be nice (maybe tiptap/remirror gets close but they are tied to vue/react)

Thank you.

It's pretty easy to create @mentions by creating and inserting a custom "atom" using the function "insert_atom" to insert the atom's HTML. And then you can do further initialization by listening to "atom-will-enter".

I need to go back and turn on the ability for sections inside atoms and cards to be contentEditable=true to be able to type text directly inside the element. During development, I had disabled all mutation observation for cards and atoms so as to not corrupt undo history. But I will work to turn editability back on soon within atoms and cards - but with precision.

I had dabbled with creating a basic editor setup in ProseMirror but overall even ProseMirror itself felt a bit too opinionated for my taste. Another usability problem was that the ProseMirror example was implemented as a module instead of as a top level project. So I had started a buildless ProseMirror example but ultimately I decided to move on anyway: https://github.com/simplygreatwork/prosemirror-buildless