[WIKI-508] fix: select all with table select #7285
This commit is contained in:
parent
f679628365
commit
5874636b0b
1 changed files with 5 additions and 1 deletions
|
|
@ -117,11 +117,15 @@ export const CustomKeymap = Extension.create({
|
|||
const endNodePos = tr.selection.$to.end();
|
||||
const isCurrentTextSelectionNotExtendedToNodeBoundaries =
|
||||
startSelectionPos > startNodePos || endSelectionPos < endNodePos;
|
||||
|
||||
if (isCurrentTextSelectionNotExtendedToNodeBoundaries) {
|
||||
// First press: select text within node boundaries
|
||||
editor.chain().selectTextWithinNodeBoundaries().run();
|
||||
return true;
|
||||
} else {
|
||||
editor.commands.selectAll();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue