rte-builder 2.0.7 → 2.0.8
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/index.css +10 -4
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1528,7 +1528,10 @@ var init_Indent = __esm({
|
|
|
1528
1528
|
},
|
|
1529
1529
|
addCommands() {
|
|
1530
1530
|
return {
|
|
1531
|
-
indent: () => ({ tr, state, dispatch }) => {
|
|
1531
|
+
indent: () => ({ tr, state, dispatch, editor }) => {
|
|
1532
|
+
if (editor.isActive("listItem")) {
|
|
1533
|
+
return editor.chain().sinkListItem("listItem").run();
|
|
1534
|
+
}
|
|
1532
1535
|
const { selection } = state;
|
|
1533
1536
|
const { from, to } = selection;
|
|
1534
1537
|
let changed = false;
|
|
@@ -1548,7 +1551,10 @@ var init_Indent = __esm({
|
|
|
1548
1551
|
});
|
|
1549
1552
|
return changed;
|
|
1550
1553
|
},
|
|
1551
|
-
outdent: () => ({ tr, state, dispatch }) => {
|
|
1554
|
+
outdent: () => ({ tr, state, dispatch, editor }) => {
|
|
1555
|
+
if (editor.isActive("listItem")) {
|
|
1556
|
+
return editor.chain().liftListItem("listItem").run();
|
|
1557
|
+
}
|
|
1552
1558
|
const { selection } = state;
|
|
1553
1559
|
const { from, to } = selection;
|
|
1554
1560
|
let changed = false;
|
|
@@ -1574,13 +1580,13 @@ var init_Indent = __esm({
|
|
|
1574
1580
|
return {
|
|
1575
1581
|
Tab: () => {
|
|
1576
1582
|
if (this.editor.isActive("listItem")) {
|
|
1577
|
-
return
|
|
1583
|
+
return this.editor.commands.sinkListItem("listItem");
|
|
1578
1584
|
}
|
|
1579
1585
|
return this.editor.commands.indent();
|
|
1580
1586
|
},
|
|
1581
1587
|
"Shift-Tab": () => {
|
|
1582
1588
|
if (this.editor.isActive("listItem")) {
|
|
1583
|
-
return
|
|
1589
|
+
return this.editor.commands.liftListItem("listItem");
|
|
1584
1590
|
}
|
|
1585
1591
|
return this.editor.commands.outdent();
|
|
1586
1592
|
}
|