typewriter-editor / typewriter

A rich text editor based off of Quill.js and Ultradom, and using Svelte for UI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential Change: More extensible base modules

taylorhadden opened this issue · comments

I am working on a project that intends to create an editing experience similar to Typora. In order to achieve this, I will need to change some fundamental assumptions that the default modules take.

The default modules do a lot of heavy lifting in making a baseline excellent editing experience. However, their current structure as raw functions makes the process of making small tweaks essentially require duplicating all logic into a new module. This means any bugfixes to the base module would need to be manually pulled over (and I'd need to be aware of them).

It would be awesome if these could be classes that could then be extended and their functions overriden. One downside would be needing to manage this for callbacks. Are there alternatives that I am missing?

To be clear, this is work that I would be taking on, if this group thought it a good idea. What do you think?

I like the closure style a lot, and really don't want to change it. But I can see how this would be beneficial for extension.

What sort of assumptions need changing, and if these were class-based, what methods would be overwritten to achieve what you need to accomplish? I'd like to understand more to help brainstorm ways to allow you to accomplish what you need to.

Unfortunately, any example I had in my head has been lost to the intervening months. I will be sure to record more specifics next time. It was likely a desire to customize the keyboard module, but I accomplished my goal simply by listening for the shortcut event, as was intended.

I'm going to close this. If something comes up, I will reopen with a concrete example in hand.