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

Function customCommand

static/wangEditor/js/wangEditor.js:7734–7750  ·  view source on GitHub ↗
(e, callback)

Source from the content-addressed store, hash-verified

7732 // 统一执行命令的方法
7733 var commandFn;
7734 function customCommand(e, callback) {
7735 var cb;
7736 // 记录下执行命令之前的html内容
7737 html = $txt.html();
7738 cb = function () {
7739 if (callback) {
7740 callback();
7741 }
7742 if (html !== $txt.html()) {
7743 $txt.change();
7744 }
7745 };
7746 // 执行命令
7747 if (commandFn) {
7748 editor.customCommand(e, commandFn, cb);
7749 }
7750 }
7751
7752 // 删除
7753 $delete.click(function (e) {

Callers 1

bindToolbarEventFunction · 0.85

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected