* feat: add command to toggle clean mode * refactor: simplify wiki_link no-clean-mode logic * refactor: use more sensible clean-mode toggling logic * fix: fix clean-mode-off not lasting across reloads * refactor: move var declaration to where it's used * feat: add root data attribute for clean mode state This allows writing styles based on whether clean mode is currently enabled or disabled. * feat: reset clean-mode-off syntax color * feat: un-hide lua directives in clean-mode-off * style: format changes from 60379b1 * feat: rename 'Toggle Clean Mode' command 'Toggle Clean Mode' is now 'Toggle Markdown Syntax Rendering', and along with the change in semantics, now defaults to false. The associated variables have also been renamed. * docs: add MD syntax rendering command to docs
386 lines
8.5 KiB
YAML
386 lines
8.5 KiB
YAML
name: editor
|
|
requiredPermissions:
|
|
- fetch
|
|
functions:
|
|
setEditorMode:
|
|
path: "./editor.ts:setEditorMode"
|
|
events:
|
|
- editor:init
|
|
toggleDarkMode:
|
|
path: "./editor.ts:toggleDarkMode"
|
|
command:
|
|
name: "Editor: Toggle Dark Mode"
|
|
toggleMarkdownSyntaxRendering:
|
|
path: "./editor.ts:toggleMarkdownSyntaxRendering"
|
|
command:
|
|
name: "Editor: Toggle Markdown Syntax Rendering"
|
|
newWindow:
|
|
path: editor.ts:newWindowCommand
|
|
command:
|
|
name: "Editor: New Window"
|
|
key: "Ctrl-n"
|
|
mac: "Cmd-n"
|
|
|
|
openCommandPalette:
|
|
path: editor.ts:openCommandPalette
|
|
command:
|
|
name: "Open Command Palette"
|
|
key: "Ctrl-/"
|
|
mac: "Cmd-/"
|
|
|
|
openPageNavigator:
|
|
path: editor.ts:openPageNavigator
|
|
command:
|
|
name: "Navigate: Page Picker"
|
|
key: "Ctrl-k"
|
|
mac: "Cmd-k"
|
|
|
|
openMetaNavigator:
|
|
path: editor.ts:openMetaNavigator
|
|
command:
|
|
name: "Navigate: Meta Picker"
|
|
key: "Ctrl-Shift-k"
|
|
mac: "Cmd-Shift-k"
|
|
|
|
openDocumentNavigator:
|
|
path: editor.ts:openDocumentNavigator
|
|
command:
|
|
name: "Navigate: Document Picker"
|
|
key: "Ctrl-o"
|
|
mac: "Cmd-o"
|
|
|
|
openAllNavigator:
|
|
path: editor.ts:openAllNavigator
|
|
command:
|
|
name: "Navigate: Anything Picker"
|
|
|
|
# Page operations
|
|
deletePage:
|
|
path: "./page.ts:deletePage"
|
|
command:
|
|
name: "Page: Delete"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
copyPage:
|
|
path: "./page.ts:copyPage"
|
|
command:
|
|
name: "Page: Copy"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
# Completion
|
|
pageComplete:
|
|
path: "./complete.ts:pageComplete"
|
|
events:
|
|
- editor:complete
|
|
|
|
reloadSystem:
|
|
path: editor.ts:reloadSystem
|
|
command:
|
|
name: "System: Reload"
|
|
key: Ctrl-Alt-r
|
|
|
|
refreshAllWidgets:
|
|
path: editor.ts:refreshAllWidgets
|
|
command:
|
|
name: "Widgets: Refresh All"
|
|
key: "Alt-q"
|
|
requireEditor: page
|
|
|
|
languageComplete:
|
|
path: complete.ts:languageComplete
|
|
events:
|
|
- editor:complete
|
|
|
|
# Navigation
|
|
linkNavigate:
|
|
path: "./navigate.ts:linkNavigate"
|
|
command:
|
|
name: "Navigate: To This Page"
|
|
key: Ctrl-Enter
|
|
mac: Cmd-Enter
|
|
requireEditor: page
|
|
clickNavigate:
|
|
path: "./navigate.ts:clickNavigate"
|
|
events:
|
|
- page:click
|
|
navigateHome:
|
|
path: "./navigate.ts:navigateCommand"
|
|
command:
|
|
name: "Navigate: Home"
|
|
key: "Alt-h"
|
|
page: ""
|
|
moveToPos:
|
|
path: "./editor.ts:moveToPosCommand"
|
|
command:
|
|
name: "Navigate: To Position"
|
|
requireEditor: page
|
|
moveToLine:
|
|
path: "./editor.ts:moveToLineCommand"
|
|
command:
|
|
name: "Navigate: To Line"
|
|
requireEditor: page
|
|
navigateToPage:
|
|
path: "./navigate.ts:navigateToPage"
|
|
command:
|
|
name: "Navigate: To Page"
|
|
hide: true
|
|
navigateToURL:
|
|
path: "./navigate.ts:navigateToURL"
|
|
command:
|
|
name: "Navigate: To URL"
|
|
hide: true
|
|
navigateBack:
|
|
path: "./navigate.ts:navigateBack"
|
|
command:
|
|
name: "Navigate: Back in History"
|
|
navigateForward:
|
|
path: "./navigate.ts:navigateForward"
|
|
command:
|
|
name: "Navigate: Forward in History"
|
|
|
|
# Text editing commands
|
|
quoteSelectionCommand:
|
|
path: ./text.ts:quoteSelection
|
|
command:
|
|
name: "Text: Quote Selection"
|
|
key: "Ctrl-Shift-."
|
|
mac: "Cmd-Shift-."
|
|
requireMode: rw
|
|
requireEditor: page
|
|
listifySelection:
|
|
path: ./text.ts:listifySelection
|
|
command:
|
|
name: "Text: Listify Selection"
|
|
key: "Ctrl-Shift-8"
|
|
mac: "Cmd-Shift-8"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
numberListifySelection:
|
|
path: ./text.ts:numberListifySelection
|
|
command:
|
|
name: "Text: Number Listify Selection"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
linkSelection:
|
|
path: ./text.ts:linkSelection
|
|
command:
|
|
name: "Text: Link Selection"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
bold:
|
|
path: ./text.ts:wrapSelection
|
|
command:
|
|
name: "Text: Bold"
|
|
key: "Ctrl-b"
|
|
mac: "Cmd-b"
|
|
wrapper: "**"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
italic:
|
|
path: ./text.ts:wrapSelection
|
|
command:
|
|
name: "Text: Italic"
|
|
key: "Ctrl-i"
|
|
mac: "Cmd-i"
|
|
wrapper: "_"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
strikethrough:
|
|
path: ./text.ts:wrapSelection
|
|
command:
|
|
name: "Text: Strikethrough"
|
|
key: "Ctrl-Shift-s"
|
|
wrapper: "~~"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
marker:
|
|
path: ./text.ts:wrapSelection
|
|
command:
|
|
name: "Text: Marker"
|
|
key: "Alt-m"
|
|
wrapper: "=="
|
|
requireMode: rw
|
|
requireEditor: page
|
|
centerCursor:
|
|
path: "./editor.ts:centerCursorCommand"
|
|
command:
|
|
name: "Navigate: Center Cursor"
|
|
key: "Ctrl-Alt-l"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
deleteLine:
|
|
path: "./editor.ts:deleteLineCommand"
|
|
command:
|
|
name: "Delete Line"
|
|
key: "Ctrl-d"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
# Debug commands
|
|
parseCommand:
|
|
path: ./system.ts:parsePageCommand
|
|
command:
|
|
name: "Debug: Parse Document"
|
|
requireEditor: page
|
|
|
|
# Vim
|
|
toggleVimMode:
|
|
path: "./vim.ts:toggleVimMode"
|
|
command:
|
|
name: "Editor: Toggle Vim Mode"
|
|
requireEditor: page
|
|
loadVimConfig:
|
|
path: "./vim.ts:loadVimConfig"
|
|
command:
|
|
name: "Editor: Vim: Load Vim Config"
|
|
requireEditor: page
|
|
events:
|
|
- editor:modeswitch
|
|
|
|
# Random stuff
|
|
statsCommand:
|
|
path: ./stats.ts:statsCommand
|
|
command:
|
|
name: "Stats: Show"
|
|
requireEditor: page
|
|
|
|
# Client commands
|
|
reloadUICommand:
|
|
path: ./system.ts:reloadUICommand
|
|
command:
|
|
name: "Client: Reload UI"
|
|
|
|
wipeClientCommand:
|
|
path: ./system.ts:wipeClientCommand
|
|
command:
|
|
name: "Client: Wipe"
|
|
|
|
wipeAndLogoutCommand:
|
|
path: ./system.ts:wipeAndLogoutCommand
|
|
command:
|
|
name: "Client: Logout"
|
|
|
|
versionCommand:
|
|
path: ./help.ts:versionCommand
|
|
command:
|
|
name: "Client: Version"
|
|
|
|
uploadFileCommand:
|
|
path: ./upload.ts:uploadFile
|
|
command:
|
|
name: "Upload: File"
|
|
requireMode: rw
|
|
|
|
# Outline commands
|
|
outlineMoveUp:
|
|
path: ./outline.ts:moveItemUp
|
|
command:
|
|
name: "Outline: Move Up"
|
|
key: "Alt-ArrowUp"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
outlineMoveDown:
|
|
path: ./outline.ts:moveItemDown
|
|
command:
|
|
name: "Outline: Move Down"
|
|
key: "Alt-ArrowDown"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
outlineIndent:
|
|
path: ./outline.ts:indentItem
|
|
command:
|
|
name: "Outline: Move Right"
|
|
key: "Alt->"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
outlineOutdent:
|
|
path: ./outline.ts:outdentItem
|
|
command:
|
|
name: "Outline: Move Left"
|
|
key: "Alt-<"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
# Outline folding commands
|
|
foldCommand:
|
|
path: ./outline.ts:foldCommand
|
|
command:
|
|
name: "Outline: Fold"
|
|
key: "Ctrl-Alt-["
|
|
requireEditor: page
|
|
unfoldCommand:
|
|
path: ./outline.ts:unfoldCommand
|
|
command:
|
|
name: "Outline: Unfold"
|
|
key: "Ctrl-Alt-]"
|
|
requireEditor: page
|
|
toggleFoldCommand:
|
|
path: ./outline.ts:toggleFoldCommand
|
|
command:
|
|
name: "Outline: Toggle Fold"
|
|
key: "Alt-Shift-f"
|
|
requireEditor: page
|
|
foldAllCommand:
|
|
path: ./outline.ts:foldAllCommand
|
|
command:
|
|
name: "Outline: Fold All"
|
|
key: "Ctrl-Alt-Shift-["
|
|
requireEditor: page
|
|
unfoldAllCommand:
|
|
path: ./outline.ts:unfoldAllCommand
|
|
command:
|
|
name: "Outline: Unfold All"
|
|
key: "Ctrl-Alt-Shift-]"
|
|
requireEditor: page
|
|
findInPageCommand:
|
|
path: editor.ts:findInPageCommand
|
|
command:
|
|
name: "Editor: Find in Page"
|
|
key: "Ctrl-f"
|
|
mac: "Cmd-f"
|
|
requireEditor: page
|
|
|
|
# Outline helper functions
|
|
determineItemBounds:
|
|
path: ./outline.ts:determineItemBounds
|
|
ensureNewLine:
|
|
path: ./outline.ts:ensureNewLine
|
|
|
|
# Undo/redo
|
|
undoCommand:
|
|
path: ./editor.ts:undoCommand
|
|
command:
|
|
name: "Editor: Undo"
|
|
key: "Ctrl-z"
|
|
mac: "Cmd-z"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
redoCommand:
|
|
path: ./editor.ts:redoCommand
|
|
command:
|
|
name: "Editor: Redo"
|
|
key: "Ctrl-y"
|
|
mac: "Cmd-Shift-z"
|
|
requireMode: rw
|
|
requireEditor: page
|
|
|
|
# Demo
|
|
customFlashMessage:
|
|
path: editor.ts:customFlashMessage
|
|
command:
|
|
name: "Flash: Custom Message"
|
|
hide: true
|
|
contexts:
|
|
- internal
|
|
|
|
deleteDocument:
|
|
path: "./document.ts:deleteDocument"
|
|
command:
|
|
name: "Document: Delete"
|
|
requireMode: rw
|
|
requireEditor: notpage
|