Bruno Windels
eb87301855
allow getting the DocumentOffset for any node+offset, not just focusNode
...
we need this to get both offsets of the selection boundaries
getSelectionOffsetAndText offers the extra flexibility,
getCaretOffsetAndText keeps the old api for focusNode/focusOffset
Also did some renaming here now that it's not just for the caret anymore
2019-09-03 15:58:50 +02:00
Bruno Windels
e531b29307
don't ignore BR elements when converting to editor dom to text
2019-08-29 13:00:31 +02:00
Bruno Windels
c443dd7a32
clarify why use a BOM marker for the caret nodes
2019-06-21 16:37:29 +02:00
Bruno Windels
366a4aa308
put zero-width spaces in caret nodes so chrome doesn't ignore them
...
this requires an update of the editor DOM > text & caret offset logic,
as the ZWS need to be ignored.
2019-06-20 14:44:18 +02:00
Bruno Windels
b0d87e7e47
allow enterNodeCallback to decide whether to decend into a node
2019-05-29 14:27:36 +02:00
Bruno Windels
6b1134bdf0
add matrix foundation copyright header
2019-05-22 16:16:32 +02:00
Bruno Windels
fd31e793d1
fix lint
2019-05-14 15:49:53 +01:00
Bruno Windels
9e0816c51c
find caret offset and calculate editor text in same tree-walking algo
...
instead of having the same logic twice
2019-05-14 15:38:16 +01:00