@jinntec/jinntap 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jinn-tap.es.js +5 -11
- package/dist/jinn-tap.umd.js +11 -11
- package/package.json +1 -1
package/dist/jinn-tap.es.js
CHANGED
|
@@ -13416,17 +13416,10 @@ class ch {
|
|
|
13416
13416
|
d.appendChild(u), this.toolbar.appendChild(d), i.get(a.name).forEach((h) => {
|
|
13417
13417
|
h.isGlobal ? this.addOptionToSelect(u, h.name, h.def, h.name, h.def) : this.addOptionToSelect(u, h.name, h.def, h.label, h.toolbarDef);
|
|
13418
13418
|
});
|
|
13419
|
-
} else if (a.isGlobal) {
|
|
13420
|
-
const c = this.createButton(a.name, a.name, a.def);
|
|
13421
|
-
c.addEventListener("click", (d) => {
|
|
13422
|
-
d.preventDefault(), a.def.command && (a.def.args ? this.editor.chain().focus()[a.def.command](...a.def.args).run() : this.editor.chain().focus()[a.def.command]().run());
|
|
13423
|
-
});
|
|
13424
|
-
const u = document.createElement("li");
|
|
13425
|
-
u.appendChild(c), this.toolbar.appendChild(u);
|
|
13426
13419
|
} else {
|
|
13427
|
-
const c = this.createButton(a.name, a.label, a.toolbarDef);
|
|
13420
|
+
const c = this.createButton(a.name, a.label, a.toolbarDef || a.def);
|
|
13428
13421
|
c.addEventListener("click", (d) => {
|
|
13429
|
-
d.preventDefault(), this.handleNodeAction(a.name, a.def, a.toolbarDef);
|
|
13422
|
+
d.preventDefault(), this.handleNodeAction(a.name, a.def, a.toolbarDef || a.def);
|
|
13430
13423
|
});
|
|
13431
13424
|
const u = document.createElement("li");
|
|
13432
13425
|
u.appendChild(c), this.toolbar.appendChild(u);
|
|
@@ -13458,7 +13451,7 @@ class ch {
|
|
|
13458
13451
|
}
|
|
13459
13452
|
const i = this.editor.chain().focus();
|
|
13460
13453
|
if (n.command)
|
|
13461
|
-
i[n.command](e, n.attributes);
|
|
13454
|
+
n.args ? i[n.command](...n.args) : i[n.command](e, n.attributes);
|
|
13462
13455
|
else if (t.type === "inline")
|
|
13463
13456
|
i.toggleMark(e, n.attributes);
|
|
13464
13457
|
else if (t.type === "list")
|
|
@@ -13743,7 +13736,8 @@ const dh = {
|
|
|
13743
13736
|
},
|
|
13744
13737
|
figDesc: {
|
|
13745
13738
|
type: "block",
|
|
13746
|
-
content: "inline*"
|
|
13739
|
+
content: "inline*",
|
|
13740
|
+
priority: 99
|
|
13747
13741
|
},
|
|
13748
13742
|
graphic: {
|
|
13749
13743
|
type: "graphic",
|