-
Notifications
You must be signed in to change notification settings - Fork 38
Expected Editor Behavior
Benjamin Bray edited this page Mar 28, 2021
·
1 revision
This section describes the expected behavior of math nodes created with prosemirror-math
. Since ProseMirror relies on contenteditable
, which behaves differently in each browser, you might experience buggy behavior in your browser of choice. If you notice something unusual, please file a bug report!
When the cursor is immediately to the left of a math node...
- Pressing
RIGHT
should expand the math node and place the cursor in the LEFTMOST inner position
When the cursor is immediately to the right of a math node...
- Pressing
LEFT
should expand the math node and place the cursor in the RIGHTMOST inner position
When the cursor is inside an INLINE math node...
- Pressing
UP
(orLEFT
when the cursor is the LEFTMOST inner position) should close the math node and place the cursor immediately BEFORE the node - Pressing
DOWN
(orRIGHT
when the cursor is in the RIGHTMOST inner position) should close the math node and place the cursor immediately AFTER the node - Pressing
ENTER
orCTRL+ENTER
should close the math node and place the cursor immediately AFTER the node
When the cursor is inside a BLOCK math node...
- Pressing
LEFT
when the cursor is in the LEFTMOST inner position should close the math node and place the cursor immediately BEFORE the unexpanded node - Pressing
RIGHT
when the cursor is in the RIGHTMOST inner position should close the math node and place the cursor immediately AFTER the unexpanded node - Pressing
UP
when the cursor is on the TOPMOST inner line should close the math node and place the cursor immediately BEFORE the unexpanded node - Pressing
DOWN
when the cursor is in the BOTTOMMOST inner line should close the math node and place the cursor immediately AFTER the unexpanded math node - Pressing
ENTER
should create a new line - Pressing
CTRL+ENTER
should close the math node and place the cursor immediately AFTER the node