anki/ts/domlib/surround
Henrik Giesel 97b28398ea
Fix some issues with new surround buttons (#1505)
* Add a store to indicate whether input trigger is active

Button state is then indicated by: caretIsInBold XOR boldTriggerActive

* Fix surrounding where normalization is tripped up by empty text nodes

* Add failing test for unsurrounding

* Fix failing test

* prohibitOverlapse does not need to be active, if aboveEnd is null

* Reinsert Italic and Underline button

* Refactor find-adjacent to use sum types

* Simplify return value of normalizeAdjacent
2021-11-24 10:33:14 +10:00
..
ascend.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
child-node-range.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
find-above.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
find-adjacent.test.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
find-adjacent.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
find-within.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
index.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
matcher.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
merge-match.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
no-splitting.test.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
no-splitting.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
normalize-insertion-ranges.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
range-anchors.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
text-node.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00
unsurround.test.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
unsurround.ts Fix some issues with new surround buttons (#1505) 2021-11-24 10:33:14 +10:00
within-range.ts Reverse-engineer surrounding with execCommand (#1377) 2021-11-18 19:18:39 +10:00