MCPcopy Create free account
hub / github.com/TruthHun/BookStack / commandFn

Function commandFn

static/wangEditor/js/wangEditor.js:582–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

580 var hooks;
581
582 function commandFn() {
583 if (!commandName) {
584 return;
585 }
586 if (editor.queryCommandSupported(commandName)) {
587 // 默认命令
588 document.execCommand(commandName, false, commandValue);
589 } else {
590 // hooks 命令
591 hooks = editor.commandHooks;
592 if (commandName in hooks) {
593 hooks[commandName](commandValue);
594 }
595 }
596 }
597
598 this.customCommand(e, commandFn, callback);
599 };

Callers

nothing calls this directly

Calls 3

textMethod · 0.80
$Function · 0.50
getMethod · 0.45

Tested by

no test coverage detected