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

Function DropList

static/wangEditor/js/wangEditor.js:1450–1467  ·  view source on GitHub ↗
(editor, menu, opt)

Source from the content-addressed store, hash-verified

1448
1449 // 定义构造函数
1450 var DropList = function (editor, menu, opt) {
1451 this.editor = editor;
1452 this.menu = menu;
1453
1454 // list 的数据源,格式 {'commandValue': 'title', ...}
1455 this.data = opt.data;
1456 // 要为每个item自定义的模板
1457 this.tpl = opt.tpl;
1458 // 为了执行 editor.commandForElem 而传入的elem查询方式
1459 this.selectorForELemCommand = opt.selectorForELemCommand;
1460
1461 // 执行事件前后的钩子
1462 this.beforeEvent = opt.beforeEvent;
1463 this.afterEvent = opt.afterEvent;
1464
1465 // 初始化
1466 this.init();
1467 };
1468
1469 DropList.fn = DropList.prototype;
1470

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected