@worktile/theia 19.1.4 → 19.1.5
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.
|
@@ -10820,6 +10820,13 @@ const withHeading = (editor) => {
|
|
|
10820
10820
|
// 协同场景下,merge_node 会被转换为 remove_node 和 insert_node
|
|
10821
10821
|
cleanHeadingEffect(editor, operation.path);
|
|
10822
10822
|
}
|
|
10823
|
+
else if (operation.type === 'set_node' && operation.path.length === 1) {
|
|
10824
|
+
const properties = operation.properties;
|
|
10825
|
+
const newProperties = operation.newProperties;
|
|
10826
|
+
if (isStandardHeadingElementByType(properties.type) && newProperties.type === ElementKinds.paragraph) {
|
|
10827
|
+
cleanHeadingEffect(editor, operation.path);
|
|
10828
|
+
}
|
|
10829
|
+
}
|
|
10823
10830
|
}
|
|
10824
10831
|
catch (error) {
|
|
10825
10832
|
console.error('Error handing heading fold(hidden followed elements):', error);
|
|
@@ -10840,21 +10847,10 @@ const withHeading = (editor) => {
|
|
|
10840
10847
|
if (!prevIsVisible) {
|
|
10841
10848
|
const relatedHeadingPaths = getPreviousRelatedHeadingElements(editor, path);
|
|
10842
10849
|
relatedHeadingPaths.forEach(path => {
|
|
10843
|
-
cleanHeadingEffect(editor, path);
|
|
10844
10850
|
Transforms.setNodes(editor, { isCollapsed: false }, { at: path });
|
|
10845
10851
|
});
|
|
10846
10852
|
}
|
|
10847
10853
|
}
|
|
10848
|
-
else if (path.length === 1 &&
|
|
10849
|
-
path[0] === 0 &&
|
|
10850
|
-
isCollapsed &&
|
|
10851
|
-
isStart &&
|
|
10852
|
-
isStandardHeadingElement(anchorBlockElement) &&
|
|
10853
|
-
anchorBlockElement.isCollapsed) {
|
|
10854
|
-
cleanHeadingEffect(editor, path);
|
|
10855
|
-
Transforms.setNodes(editor, { isCollapsed: null, type: ElementKinds.paragraph }, { at: path });
|
|
10856
|
-
return;
|
|
10857
|
-
}
|
|
10858
10854
|
}
|
|
10859
10855
|
deleteBackward(unit);
|
|
10860
10856
|
};
|
|
@@ -10945,7 +10941,6 @@ const withHeading = (editor) => {
|
|
|
10945
10941
|
const rect = dom.getBoundingClientRect();
|
|
10946
10942
|
if (event.y > rect.bottom && event.x > rect.left && event.x < rect.right) {
|
|
10947
10943
|
collapsedStandardHeadings.forEach(path => {
|
|
10948
|
-
cleanHeadingEffect(editor, path);
|
|
10949
10944
|
Transforms.setNodes(editor, { isCollapsed: false }, { at: path });
|
|
10950
10945
|
});
|
|
10951
10946
|
const isEmptyParagraph = isEmptyParagraphElement(editor, editor.children[index]);
|