Description
Currently, text editing relies partially on DOM-based inputs or external overlays, which introduces inconsistencies with the canvas rendering pipeline and adds complexity to the interaction model. This issue proposes migrating the Text node editing experience to be fully native within Konva, removing DOM dependencies and ensuring consistent behavior with other canvas-native elements.
By implementing native editing directly on the Konva stage, we can improve performance, simplify event handling, and ensure transformations (scale, rotate, drag) behave consistently during editing.
Requirements
- Cursor rendering inside the canvas.
- Text selection support.
- Keyboard input handling.
- Support multiline text editing.
- Handle IME input correctly.
Proper caret positioning considering:
- font metrics
- alignment
- line height
- scaling
Acceptance Criteria
- Text can be edited directly on the canvas without DOM overlays.
- Caret position matches the rendered text exactly.
- Selection highlight is rendered natively.
- Editing behaves correctly with rotated and scaled nodes.
- No regression in text rendering performance.
Description
Currently, text editing relies partially on DOM-based inputs or external overlays, which introduces inconsistencies with the canvas rendering pipeline and adds complexity to the interaction model. This issue proposes migrating the Text node editing experience to be fully native within Konva, removing DOM dependencies and ensuring consistent behavior with other canvas-native elements.
By implementing native editing directly on the Konva stage, we can improve performance, simplify event handling, and ensure transformations (scale, rotate, drag) behave consistently during editing.
Requirements
Proper caret positioning considering:
Acceptance Criteria