1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Desktop: Undo changes introduced in #4303 (#4406)

This commit is contained in:
Caleb John
2021-02-06 09:01:06 -07:00
committed by GitHub
parent 11c8bf7e6e
commit 33e1214ef6
18 changed files with 82 additions and 117 deletions

View File

@ -309,40 +309,4 @@ export default class CommandService extends BaseService {
const command = this.commandByName(commandName, { mustExist: false });
return !!command;
}
public static isEditorCommand(commandName: string) {
return (commandName.indexOf('editor.') === 0 ||
// These commands are grandfathered in, but in the future
// all editor commands should start with "editor."
commandName === 'insertText' ||
commandName === 'scrollToHash' ||
commandName === 'textCopy' ||
commandName === 'textCut' ||
commandName === 'textPaste' ||
commandName === 'textSelectAll' ||
commandName === 'textBold' ||
commandName === 'textItalic' ||
commandName === 'textLink' ||
commandName === 'textCode' ||
commandName === 'attachFile' ||
commandName === 'textNumberedList' ||
commandName === 'textBulletedList' ||
commandName === 'textCheckbox' ||
commandName === 'textHeading' ||
commandName === 'textHorizontalRule' ||
commandName === 'insertDateTime' ||
commandName === 'selectedText' ||
commandName === 'replaceSelection'
);
}
public editorCommandDeclarations(): CommandDeclaration[] {
const output = [];
for (const name in this.commands_) {
if (CommandService.isEditorCommand(name)) { output.push(this.commands_[name].declaration); }
}
return output;
}
}