1cod
October 3, 2022, 11:53am
1
Use case or problem
there is no way to select a whole page content
Proposed solution
add a command to command palette (ctrl A by default could be a good option)
Current workaround (optional)
this.addCommand({
id: "select-all",
name: "Select All",
hotkeys: [{ modifiers: ["Mod"], key: "a" }],
editorCallback: (editor: Editor) => {
function toPos(pos: number): EditorPosition {
return editor.offsetToPos(pos);
}
const lastline = editor.lastLine();
const lastCh = editor.getLine(lastline).length;
editor.setSelection(
{ line: 0, ch: 0 },
{ line: lastline, ch: lastCh }
);
},
CMD A works on macOS, and I believe CTRL A should work on Windows. Have you tried this in the sandbox vault?
2 Likes
1cod
October 3, 2022, 1:11pm
3
really? ahaha I tried before and it was not working. I was so surprised. I really wonder how? lol
thks I close the topic. at least it was a coding training.
edit:
or wait maybe I created a “silly” shortcut, trying a plugin, but it was not telling me it already existed. that’s it.
2 Likes
system
Closed
October 10, 2022, 1:11pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.