[WIKI-508] fix: select all with table select #7285

This commit is contained in:
M. Palanikannan
2025-07-02 15:41:31 +05:30
committed by GitHub
parent f679628365
commit 5874636b0b

View File

@@ -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;
},
};
},