Rich text editor based on canvas
OTHER License
2d canvas-based Rich Text Editor.
Textik
is a fork of Carota.
# testing
npm start
There a lot of rich-text editors. All of them DOM based with contentEditable
flow.
But I need a tool to display rich text inside canvas.
It is possible to do some workarounds with html2canvas
tool. (1) Convert DOM (rich text) into image and (2) then display it on canvas. But that aproach is slow and not very consistent.
So we will have to make a new solution. If possible it should use canvas API only to do rendering.
Even Google Docs is looking into that direction: https://workspaceupdates.googleblog.com/2021/05/Google-Docs-Canvas-Based-Rendering-Update.html
textik
, it should look 100% the same as that string in the DOM.konva
.konva
it should wrap long word if width is limitedkonva