@harbour-enterprises/superdoc 0.25.0-next.4 → 0.25.0-next.6
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/chunks/{PdfViewer-D4F3H-Ay.es.js → PdfViewer-BOrm7Awj.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BETK3Bs4.cjs → PdfViewer-BeQy7uL0.cjs} +1 -1
- package/dist/chunks/{index-BHS2aLqo.cjs → index-7exCeEb1.cjs} +2 -2
- package/dist/chunks/{index-D9KYAvvg.es.js → index-DDGjYIm1.es.js} +2 -2
- package/dist/chunks/{super-editor.es-BJzqCihw.cjs → super-editor.es-GExnUB7l.cjs} +168 -131
- package/dist/chunks/{super-editor.es-Beeng5kU.es.js → super-editor.es-XXbEUVCc.es.js} +168 -131
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{editor-DC9ZOqdt.js → editor-D1Q0suDz.js} +166 -129
- package/dist/super-editor/chunks/{toolbar-SPGEoEi0.js → toolbar-DjuLzygc.js} +1 -1
- package/dist/super-editor/editor.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts +1 -0
- package/dist/super-editor/super-editor.es.js +5 -5
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +168 -131
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -60282,7 +60282,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60282
60282
|
isHeaderFooterChanged: false,
|
|
60283
60283
|
isCustomXmlChanged: false,
|
|
60284
60284
|
focusTarget: null,
|
|
60285
|
-
permissionResolver: null
|
|
60285
|
+
permissionResolver: null,
|
|
60286
|
+
// header/footer editors may have parent(main) editor set
|
|
60287
|
+
parentEditor: null
|
|
60286
60288
|
});
|
|
60287
60289
|
__privateMethod$1(this, _Editor_instances, initContainerElement_fn).call(this, options);
|
|
60288
60290
|
__privateMethod$1(this, _Editor_instances, checkHeadless_fn).call(this, options);
|
|
@@ -72490,58 +72492,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72490
72492
|
}
|
|
72491
72493
|
});
|
|
72492
72494
|
};
|
|
72493
|
-
const normalizeWrap = (attrs = {}) => {
|
|
72494
|
-
const wrap2 = attrs.wrap;
|
|
72495
|
-
if (wrap2?.type && wrap2.type !== "Inline") {
|
|
72496
|
-
return {
|
|
72497
|
-
type: wrap2.type,
|
|
72498
|
-
attrs: wrap2.attrs ?? {}
|
|
72499
|
-
};
|
|
72500
|
-
}
|
|
72501
|
-
if (wrap2?.type === "Inline" && Object.keys(wrap2.attrs ?? {}).length) {
|
|
72502
|
-
return {
|
|
72503
|
-
type: "Inline",
|
|
72504
|
-
attrs: wrap2.attrs
|
|
72505
|
-
};
|
|
72506
|
-
}
|
|
72507
|
-
if (!wrap2 && attrs.wrapText) {
|
|
72508
|
-
return {
|
|
72509
|
-
type: "Square",
|
|
72510
|
-
attrs: {
|
|
72511
|
-
wrapText: attrs.wrapText
|
|
72512
|
-
}
|
|
72513
|
-
};
|
|
72514
|
-
}
|
|
72515
|
-
if (!wrap2 && attrs.wrapTopAndBottom) {
|
|
72516
|
-
return {
|
|
72517
|
-
type: "TopAndBottom",
|
|
72518
|
-
attrs: {}
|
|
72519
|
-
};
|
|
72520
|
-
}
|
|
72521
|
-
if (wrap2?.type === "Inline") {
|
|
72522
|
-
return {
|
|
72523
|
-
type: "Inline",
|
|
72524
|
-
attrs: wrap2.attrs ?? {}
|
|
72525
|
-
};
|
|
72526
|
-
}
|
|
72527
|
-
return {
|
|
72528
|
-
type: "Inline",
|
|
72529
|
-
attrs: {}
|
|
72530
|
-
};
|
|
72531
|
-
};
|
|
72532
|
-
const normalizeMarginOffset = (marginOffset = {}) => {
|
|
72533
|
-
const { left: left2, horizontal, ...rest } = marginOffset;
|
|
72534
|
-
return {
|
|
72535
|
-
...rest,
|
|
72536
|
-
horizontal: horizontal ?? left2
|
|
72537
|
-
};
|
|
72538
|
-
};
|
|
72539
|
-
const getNormalizedImageAttrs = (attrs = {}) => {
|
|
72540
|
-
return {
|
|
72541
|
-
wrap: normalizeWrap(attrs),
|
|
72542
|
-
marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
|
|
72543
|
-
};
|
|
72544
|
-
};
|
|
72545
72495
|
const ImagePositionPluginKey = new PluginKey("ImagePosition");
|
|
72546
72496
|
const ImagePositionPlugin = ({ editor }) => {
|
|
72547
72497
|
const { view } = editor;
|
|
@@ -72554,8 +72504,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72554
72504
|
return DecorationSet.empty;
|
|
72555
72505
|
},
|
|
72556
72506
|
apply(tr, oldDecorationSet, oldState, newState) {
|
|
72557
|
-
if (!tr.docChanged) return oldDecorationSet;
|
|
72507
|
+
if (!tr.docChanged && !shouldUpdate) return oldDecorationSet;
|
|
72558
72508
|
const decorations = getImagePositionDecorations(newState, view);
|
|
72509
|
+
shouldUpdate = false;
|
|
72559
72510
|
return DecorationSet.create(newState.doc, decorations);
|
|
72560
72511
|
}
|
|
72561
72512
|
},
|
|
@@ -72564,7 +72515,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72564
72515
|
update: (view2, lastState) => {
|
|
72565
72516
|
const pagination = PaginationPluginKey.getState(lastState);
|
|
72566
72517
|
if (shouldUpdate) {
|
|
72567
|
-
shouldUpdate = false;
|
|
72568
72518
|
const decorations = getImagePositionDecorations(lastState, view2);
|
|
72569
72519
|
const updateTransaction = view2.state.tr.setMeta(ImagePositionPluginKey, { decorations });
|
|
72570
72520
|
view2.dispatch(updateTransaction);
|
|
@@ -72590,41 +72540,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72590
72540
|
let className = "";
|
|
72591
72541
|
const { vRelativeFrom, alignH } = node.attrs.anchorData;
|
|
72592
72542
|
const { size: size2, padding } = node.attrs;
|
|
72593
|
-
const { marginOffset } = getNormalizedImageAttrs(node.attrs);
|
|
72594
72543
|
const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
|
|
72595
|
-
if (pageBreak) {
|
|
72596
|
-
|
|
72597
|
-
|
|
72598
|
-
|
|
72599
|
-
|
|
72600
|
-
|
|
72601
|
-
|
|
72602
|
-
|
|
72603
|
-
|
|
72604
|
-
|
|
72605
|
-
|
|
72544
|
+
if (pageBreak && vRelativeFrom === "margin" && alignH) {
|
|
72545
|
+
const topPos = pageBreak?.offsetTop + pageBreak?.offsetHeight;
|
|
72546
|
+
let horizontalAlignment = `${alignH}: 0;`;
|
|
72547
|
+
if (alignH === "center") horizontalAlignment = "left: 50%; transform: translateX(-50%);";
|
|
72548
|
+
style2 += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ${horizontalAlignment}` : "";
|
|
72549
|
+
const nextPos = view.posAtDOM(pageBreak, 1);
|
|
72550
|
+
if (nextPos < 0) {
|
|
72551
|
+
const $pos = view.state.doc.resolve(pos);
|
|
72552
|
+
decorations.push(
|
|
72553
|
+
Decoration.node(pos - 1, pos + $pos.parent.nodeSize - 1, {
|
|
72554
|
+
style: `height: ${size2.height + parseInt(padding.top) + parseInt(padding.bottom)}px`
|
|
72555
|
+
})
|
|
72556
|
+
);
|
|
72606
72557
|
}
|
|
72607
|
-
const
|
|
72608
|
-
|
|
72609
|
-
|
|
72610
|
-
|
|
72611
|
-
|
|
72612
|
-
|
|
72613
|
-
|
|
72614
|
-
|
|
72615
|
-
style: `height: ${size2.height + parseInt(padding.top) + parseInt(padding.bottom)}px`
|
|
72616
|
-
})
|
|
72617
|
-
);
|
|
72618
|
-
}
|
|
72619
|
-
const imageBlock = document.createElement("div");
|
|
72620
|
-
imageBlock.className = "anchor-image-placeholder";
|
|
72621
|
-
imageBlock.style.float = alignH;
|
|
72622
|
-
imageBlock.style.width = size2.width + parseInt(padding[alignH]) + "px";
|
|
72623
|
-
imageBlock.style.height = size2.height + parseInt(padding.top) + parseInt(padding.bottom) + "px";
|
|
72624
|
-
decorations.push(Decoration.widget(nextPos, imageBlock, { key: "stable-key" }));
|
|
72558
|
+
const imageBlock = document.createElement("div");
|
|
72559
|
+
imageBlock.className = "anchor-image-placeholder";
|
|
72560
|
+
imageBlock.style.float = alignH === "left" || alignH === "right" ? alignH : "none";
|
|
72561
|
+
let paddingHorizontal;
|
|
72562
|
+
if (alignH === "center") {
|
|
72563
|
+
paddingHorizontal = (parseInt(padding.left) || 0) + (parseInt(padding.right) || 0);
|
|
72564
|
+
} else {
|
|
72565
|
+
paddingHorizontal = parseInt(padding[alignH]) || 0;
|
|
72625
72566
|
}
|
|
72567
|
+
imageBlock.style.width = size2.width + paddingHorizontal + "px";
|
|
72568
|
+
imageBlock.style.height = size2.height + parseInt(padding.top) + parseInt(padding.bottom) + "px";
|
|
72569
|
+
decorations.push(Decoration.widget(nextPos, imageBlock, { key: "stable-key" }));
|
|
72570
|
+
decorations.push(Decoration.inline(pos, pos + node.nodeSize, { style: style2, class: className }));
|
|
72626
72571
|
}
|
|
72627
|
-
decorations.push(Decoration.inline(pos, pos + node.nodeSize, { style: style2, class: className }));
|
|
72628
72572
|
}
|
|
72629
72573
|
});
|
|
72630
72574
|
return decorations;
|
|
@@ -72649,6 +72593,58 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72649
72593
|
}
|
|
72650
72594
|
return null;
|
|
72651
72595
|
};
|
|
72596
|
+
const normalizeWrap = (attrs = {}) => {
|
|
72597
|
+
const wrap2 = attrs.wrap;
|
|
72598
|
+
if (wrap2?.type && wrap2.type !== "Inline") {
|
|
72599
|
+
return {
|
|
72600
|
+
type: wrap2.type,
|
|
72601
|
+
attrs: wrap2.attrs ?? {}
|
|
72602
|
+
};
|
|
72603
|
+
}
|
|
72604
|
+
if (wrap2?.type === "Inline" && Object.keys(wrap2.attrs ?? {}).length) {
|
|
72605
|
+
return {
|
|
72606
|
+
type: "Inline",
|
|
72607
|
+
attrs: wrap2.attrs
|
|
72608
|
+
};
|
|
72609
|
+
}
|
|
72610
|
+
if (!wrap2 && attrs.wrapText) {
|
|
72611
|
+
return {
|
|
72612
|
+
type: "Square",
|
|
72613
|
+
attrs: {
|
|
72614
|
+
wrapText: attrs.wrapText
|
|
72615
|
+
}
|
|
72616
|
+
};
|
|
72617
|
+
}
|
|
72618
|
+
if (!wrap2 && attrs.wrapTopAndBottom) {
|
|
72619
|
+
return {
|
|
72620
|
+
type: "TopAndBottom",
|
|
72621
|
+
attrs: {}
|
|
72622
|
+
};
|
|
72623
|
+
}
|
|
72624
|
+
if (wrap2?.type === "Inline") {
|
|
72625
|
+
return {
|
|
72626
|
+
type: "Inline",
|
|
72627
|
+
attrs: wrap2.attrs ?? {}
|
|
72628
|
+
};
|
|
72629
|
+
}
|
|
72630
|
+
return {
|
|
72631
|
+
type: "Inline",
|
|
72632
|
+
attrs: {}
|
|
72633
|
+
};
|
|
72634
|
+
};
|
|
72635
|
+
const normalizeMarginOffset = (marginOffset = {}) => {
|
|
72636
|
+
const { left: left2, horizontal, ...rest } = marginOffset;
|
|
72637
|
+
return {
|
|
72638
|
+
...rest,
|
|
72639
|
+
horizontal: horizontal ?? left2
|
|
72640
|
+
};
|
|
72641
|
+
};
|
|
72642
|
+
const getNormalizedImageAttrs = (attrs = {}) => {
|
|
72643
|
+
return {
|
|
72644
|
+
wrap: normalizeWrap(attrs),
|
|
72645
|
+
marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
|
|
72646
|
+
};
|
|
72647
|
+
};
|
|
72652
72648
|
const getRotationMargins = (w2, h2, angleDegrees) => {
|
|
72653
72649
|
const rad = angleDegrees * (Math.PI / 180);
|
|
72654
72650
|
const cos = Math.abs(Math.cos(rad));
|
|
@@ -72857,27 +72853,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72857
72853
|
style2 += "float: right;";
|
|
72858
72854
|
floatRight = true;
|
|
72859
72855
|
} else if (["largest", "bothSides"].includes(attrs.wrapText)) {
|
|
72860
|
-
const
|
|
72861
|
-
|
|
72862
|
-
|
|
72863
|
-
|
|
72864
|
-
|
|
72865
|
-
|
|
72866
|
-
|
|
72867
|
-
|
|
72868
|
-
|
|
72869
|
-
if (rightSpace < 0) {
|
|
72870
|
-
style2 += "float: left;";
|
|
72871
|
-
} else if (rightSpace > leftSpace) {
|
|
72872
|
-
style2 += "float: left;";
|
|
72873
|
-
} else {
|
|
72874
|
-
style2 += "float: right;";
|
|
72875
|
-
floatRight = true;
|
|
72876
|
-
baseHorizontal = rightSpace;
|
|
72877
|
-
}
|
|
72878
|
-
} else {
|
|
72879
|
-
style2 += "float: left;";
|
|
72880
|
-
}
|
|
72856
|
+
const pageStylesData2 = getDataFromPageStyles({
|
|
72857
|
+
editor: this.editor,
|
|
72858
|
+
marginOffset,
|
|
72859
|
+
size: size2,
|
|
72860
|
+
attrs
|
|
72861
|
+
});
|
|
72862
|
+
style2 += pageStylesData2.style;
|
|
72863
|
+
floatRight = pageStylesData2.floatRight;
|
|
72864
|
+
baseHorizontal = pageStylesData2.baseHorizontal;
|
|
72881
72865
|
}
|
|
72882
72866
|
if (attrs.distTop) margin.top += attrs.distTop;
|
|
72883
72867
|
if (attrs.distBottom) margin.bottom += attrs.distBottom;
|
|
@@ -72887,27 +72871,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72887
72871
|
case "Through":
|
|
72888
72872
|
case "Tight":
|
|
72889
72873
|
style2 += "clear: both;";
|
|
72890
|
-
const
|
|
72891
|
-
|
|
72892
|
-
|
|
72893
|
-
|
|
72894
|
-
|
|
72895
|
-
|
|
72896
|
-
|
|
72897
|
-
|
|
72898
|
-
|
|
72899
|
-
if (rightSpace < 0) {
|
|
72900
|
-
style2 += "float: left;";
|
|
72901
|
-
} else if (rightSpace > leftSpace) {
|
|
72902
|
-
style2 += "float: left;";
|
|
72903
|
-
} else {
|
|
72904
|
-
style2 += "float: right;";
|
|
72905
|
-
floatRight = true;
|
|
72906
|
-
baseHorizontal = rightSpace;
|
|
72907
|
-
}
|
|
72908
|
-
} else {
|
|
72909
|
-
style2 += "float: left;";
|
|
72910
|
-
}
|
|
72874
|
+
const pageStylesData = getDataFromPageStyles({
|
|
72875
|
+
editor: this.editor,
|
|
72876
|
+
marginOffset,
|
|
72877
|
+
size: size2,
|
|
72878
|
+
attrs
|
|
72879
|
+
});
|
|
72880
|
+
style2 += pageStylesData.style;
|
|
72881
|
+
floatRight = pageStylesData.floatRight;
|
|
72882
|
+
baseHorizontal = pageStylesData.baseHorizontal;
|
|
72911
72883
|
if (attrs.distTop) margin.top += attrs.distTop;
|
|
72912
72884
|
if (attrs.distBottom) margin.bottom += attrs.distBottom;
|
|
72913
72885
|
if (attrs.distLeft) margin.left += attrs.distLeft;
|
|
@@ -72944,6 +72916,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
72944
72916
|
}
|
|
72945
72917
|
const hasAnchorData = Boolean(anchorData);
|
|
72946
72918
|
const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
|
|
72919
|
+
if (hasAnchorData) {
|
|
72920
|
+
switch (anchorData.hRelativeFrom) {
|
|
72921
|
+
case "page":
|
|
72922
|
+
const pageStyles = this.editor?.converter?.pageStyles || this.editor?.options.parentEditor?.converter?.pageStyles;
|
|
72923
|
+
margin.left -= inchesToPixels(pageStyles?.pageMargins?.left) || 0;
|
|
72924
|
+
break;
|
|
72925
|
+
case "margin":
|
|
72926
|
+
if (anchorData.alignH === "center") {
|
|
72927
|
+
style2 += "position: absolute; left: 50%; transform: translateX(-50%);";
|
|
72928
|
+
}
|
|
72929
|
+
if (anchorData.alignH === "left" || anchorData.alignH === "right") {
|
|
72930
|
+
style2 += `position: absolute; ${anchorData.alignH}: 0;`;
|
|
72931
|
+
}
|
|
72932
|
+
break;
|
|
72933
|
+
}
|
|
72934
|
+
}
|
|
72947
72935
|
if (hasAnchorData || hasMarginOffsets) {
|
|
72948
72936
|
const relativeFromPageV = anchorData?.vRelativeFrom === "page";
|
|
72949
72937
|
const maxMarginV = 500;
|
|
@@ -73092,6 +73080,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
73092
73080
|
return [ImageRegistrationPlugin({ editor: this.editor }), ImagePositionPlugin({ editor: this.editor })];
|
|
73093
73081
|
}
|
|
73094
73082
|
});
|
|
73083
|
+
const getDataFromPageStyles = ({ editor, marginOffset, size: size2, attrs }) => {
|
|
73084
|
+
let style2 = "";
|
|
73085
|
+
let floatRight = false;
|
|
73086
|
+
let baseHorizontal = marginOffset?.horizontal || 0;
|
|
73087
|
+
const pageStyles = editor?.converter?.pageStyles || editor?.options.parentEditor?.converter?.pageStyles;
|
|
73088
|
+
if (pageStyles?.pageSize && pageStyles?.pageMargins && size2.width) {
|
|
73089
|
+
const pageWidth = inchesToPixels(pageStyles.pageSize.width);
|
|
73090
|
+
const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
|
|
73091
|
+
const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
|
|
73092
|
+
const contentWidth = pageWidth - leftMargin - rightMargin;
|
|
73093
|
+
const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
|
|
73094
|
+
const leftSpace = marginOffset.horizontal;
|
|
73095
|
+
const rightSpace = contentWidth - leftSpace - imageWidth;
|
|
73096
|
+
if (rightSpace < 0) {
|
|
73097
|
+
style2 += "float: left;";
|
|
73098
|
+
} else if (rightSpace > leftSpace) {
|
|
73099
|
+
style2 += "float: left;";
|
|
73100
|
+
} else {
|
|
73101
|
+
style2 += "float: right;";
|
|
73102
|
+
floatRight = true;
|
|
73103
|
+
baseHorizontal = rightSpace;
|
|
73104
|
+
}
|
|
73105
|
+
} else {
|
|
73106
|
+
style2 += "float: left;";
|
|
73107
|
+
}
|
|
73108
|
+
return {
|
|
73109
|
+
style: style2,
|
|
73110
|
+
floatRight,
|
|
73111
|
+
baseHorizontal
|
|
73112
|
+
};
|
|
73113
|
+
};
|
|
73095
73114
|
const ACCEPT_IMAGE_TYPES = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"];
|
|
73096
73115
|
const getFileOpener = () => {
|
|
73097
73116
|
let fileInput = document.createElement("input");
|
|
@@ -75213,6 +75232,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
75213
75232
|
const { from: from2, to } = state2.selection;
|
|
75214
75233
|
return commands2.acceptTrackedChangesBetween(from2, to);
|
|
75215
75234
|
},
|
|
75235
|
+
acceptTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
|
|
75236
|
+
const commentsPluginState = CommentsPluginKey.getState(state2);
|
|
75237
|
+
const activeThreadId = commentsPluginState?.activeThreadId;
|
|
75238
|
+
if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
|
|
75239
|
+
return commands2.acceptTrackedChangeById(activeThreadId);
|
|
75240
|
+
} else {
|
|
75241
|
+
return commands2.acceptTrackedChangeBySelection();
|
|
75242
|
+
}
|
|
75243
|
+
},
|
|
75216
75244
|
acceptTrackedChangeById: (id) => ({ state: state2, tr, commands: commands2 }) => {
|
|
75217
75245
|
const toResolve = getChangesByIdToResolve(state2, id) || [];
|
|
75218
75246
|
return toResolve.map(({ from: from2, to }) => {
|
|
@@ -75241,6 +75269,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
75241
75269
|
const { from: from2, to } = state2.selection;
|
|
75242
75270
|
return commands2.rejectTrackedChangesBetween(from2, to);
|
|
75243
75271
|
},
|
|
75272
|
+
rejectTrackedChangeFromToolbar: () => ({ state: state2, commands: commands2 }) => {
|
|
75273
|
+
const commentsPluginState = CommentsPluginKey.getState(state2);
|
|
75274
|
+
const activeThreadId = commentsPluginState?.activeThreadId;
|
|
75275
|
+
if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
|
|
75276
|
+
return commands2.rejectTrackedChangeById(activeThreadId);
|
|
75277
|
+
} else {
|
|
75278
|
+
return commands2.rejectTrackedChangeOnSelection();
|
|
75279
|
+
}
|
|
75280
|
+
},
|
|
75244
75281
|
rejectAllTrackedChanges: () => ({ state: state2, commands: commands2 }) => {
|
|
75245
75282
|
const from2 = 0, to = state2.doc.content.size;
|
|
75246
75283
|
return commands2.rejectTrackedChangesBetween(from2, to);
|
|
@@ -80534,7 +80571,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
80534
80571
|
return oldState;
|
|
80535
80572
|
}
|
|
80536
80573
|
if (typeof document === "undefined" || editor.options.isHeadless) return oldState;
|
|
80537
|
-
if (editor.options.documentMode === "viewing" || !editor.isEditable) {
|
|
80574
|
+
if (!editor.options.isHeaderOrFooter && (editor.options.documentMode === "viewing" || !editor.isEditable)) {
|
|
80538
80575
|
return DecorationSet.empty;
|
|
80539
80576
|
}
|
|
80540
80577
|
const { selection } = newState;
|
|
@@ -93643,7 +93680,7 @@ ${style2}
|
|
|
93643
93680
|
disabled: false,
|
|
93644
93681
|
name: "acceptTrackedChangeBySelection",
|
|
93645
93682
|
tooltip: toolbarTexts2.trackChangesAccept,
|
|
93646
|
-
command: "
|
|
93683
|
+
command: "acceptTrackedChangeFromToolbar",
|
|
93647
93684
|
icon: toolbarIcons2.trackChangesAccept,
|
|
93648
93685
|
group: "left",
|
|
93649
93686
|
attributes: {
|
|
@@ -93655,7 +93692,7 @@ ${style2}
|
|
|
93655
93692
|
disabled: false,
|
|
93656
93693
|
name: "rejectTrackedChangeOnSelection",
|
|
93657
93694
|
tooltip: toolbarTexts2.trackChangesReject,
|
|
93658
|
-
command: "
|
|
93695
|
+
command: "rejectTrackedChangeFromToolbar",
|
|
93659
93696
|
icon: toolbarIcons2.trackChangesReject,
|
|
93660
93697
|
group: "left",
|
|
93661
93698
|
attributes: {
|