MCPcopy Index your code
hub / github.com/tinymce/tinymce / addCommand

Method addCommand

modules/tinymce/src/core/main/ts/api/Editor.ts:523–533  ·  view source on GitHub ↗
(name: string, callback: EditorCommandCallback<any>, scope?: object)

Source from the content-addressed store, hash-verified

521 public addCommand<S>(name: string, callback: EditorCommandCallback<S>, scope: S): void;
522 public addCommand(name: string, callback: EditorCommandCallback<Editor>): void;
523 public addCommand(name: string, callback: EditorCommandCallback<any>, scope?: object): void {
524 /**
525 * Callback function that gets called when a command is executed.
526 *
527 * @callback addCommandCallback
528 * @param {Boolean} ui Display UI state true/false.
529 * @param {Object} value Optional value for command.
530 * @return {Boolean} True/false state if the command was handled or not.
531 */
532 this.editorCommands.addCommand(name, callback, scope);
533 }
534
535 /**
536 * Adds a custom query state command to the editor. This function can also be used to override existing commands.

Callers 15

EditorTest.tsFile · 0.45
setupFunction · 0.45
setupFunction · 0.45
registerFunction · 0.45
setupFunction · 0.45
registerCommandsFunction · 0.45
renderFunction · 0.45
registerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected