Experiment: Creating a canvas textbox. (No mobile yet)
Current roadmap for this canvas textbox:
Legend
- planned; not yet done
- currently working on
- successfully completed
- failed; ommitted
Phase 1:
basic fundamentals
- type words when selected
- display typed words
- implement backspace and delete
- wrap words on new lines
- long word break
-
refactor to use variables instead of numbers in lots of places (font,
font size, paddings/offset, lineheight)
- new line with enter
- clipping
- refactor to use function instead of class
-
implement addText, addTextLn, clearText, setText, removeTextLn
functions
- text-align
- multiline or single line
- scroll x and y based on word wrap setting
Phase 2:
intermediate functionality
-
control<left/right to move cursor position per word
- control<delete/backspace to delete per word
- home/end to navigate faster left and right
- page down and up to navigate faster up and down
- only render what can be seen
- select text via keyboard with shift
- copy/cut/select all with control<c/x/a
-
paste with control<v [unsupported by browsers globally to preserve
security]
- select text via mouse
- display changed cursor when hovering text field
- visualize selected text
-
local paste with control<v [can only paste what's copied from
textfield]
Phase 3:
advanced customization
- dynamic text, input text and password text
- borders and background colours
- colours at content
-
italics or bolds if desired -to be added in version 2.0 if started
- links -to be added in version 2.0 if started