3 ms·
I wrote an article on this topic. https://datacadamia.com/web/html/editor https://datacadamia.com/web/html/editor Basically, you work on a textarea, you work a
by gerardnico 5y ago
I wrote an article on this topic.
https://datacadamia.com/web/html/editor https://datacadamia.com/web/html/editor
Basically, you work on a textarea, you work against a dom (html Dom directly or a virtual Dom) that acts as the AST.
Google docs is hard because it adds pagination which means you need to calculate all positions and dimension.
For basic text editing, this is not hard but if you want to add structural component, you have much more work.
React has already a text editing framework. Take a look.