3 ms·
My attempt at implementing what medium describes: https://github.com/NickStefan/tome-editor https://github.com/NickStefan/tome-editor My favorite idea was usin
by nickstefan12 11y ago
My attempt at implementing what medium describes: https://github.com/NickStefan/tome-editor https://github.com/NickStefan/tome-editor
My favorite idea was using independent ranges data objects to track styling. Eg {start: 2, end: 3, range: color, value: blue}. Then only the rendering api needs to worry about overlapping ranges. Basically avoids manipulating trees. That's partly what makes content editable suck so much.
- dmix 11y agoCould you publish an online demo, even a gif if you don't want to host one? You're probably missing out on quite a few users who are too lazy to clone and install, just to bookmark for later use.
- nickstefan12 11y agoI've been meaning to do that! I'll definitely move it up the priority list. I had intended the api to be entirely programmatic and allow others to build GUIs for how they wanted, say, font size drop downs to look. I could host the test html page I've been testing it with. It exposes some random styling buttons and visualizes the data model below the rendered text.