@ones-editor/editor 2.9.8-beta.15 → 2.9.8-beta.17

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.js CHANGED
@@ -8809,7 +8809,28 @@ div.editor-root div.editor-content div[data-type=editor-container].root.select-a
8809
8809
  margin-left: 5px;
8810
8810
  margin-right: 5px;
8811
8811
  }div.editor-root.compact div.editor-content div[data-type=editor-container].root > .container-blocks > * + * {
8812
- margin: 0.2em 0;
8812
+ margin-top: 0.2em;
8813
+ }
8814
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-quoted] + div[data-type=editor-block][data-style-quoted] {
8815
+ margin-top: 0;
8816
+ }
8817
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="1"]:not(:first-child) {
8818
+ margin-top: 0.5em !important;
8819
+ }
8820
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="2"]:not(:first-child) {
8821
+ margin-top: 0.5em !important;
8822
+ }
8823
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="3"]:not(:first-child) {
8824
+ margin-top: 0.5em !important;
8825
+ }
8826
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="4"]:not(:first-child) {
8827
+ margin-top: 0.4em !important;
8828
+ }
8829
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="5"]:not(:first-child) {
8830
+ margin-top: 0.3em !important;
8831
+ }
8832
+ div.editor-root.compact div.editor-content div[data-type=editor-block][data-style-heading="6"]:not(:first-child) {
8833
+ margin-top: 0.2em !important;
8813
8834
  }
8814
8835
  div.editor-root.compact.no-heading-collapse.no-block-menu > .editor-content {
8815
8836
  padding-left: 10px;
@@ -26634,13 +26655,14 @@ var __publicField = (obj, key, value) => {
26634
26655
  while (prevBlock && !blocks.has(getBlockId(prevBlock))) {
26635
26656
  prevBlock = getPrevVisibleBlock(prevBlock);
26636
26657
  }
26637
- assert(logger$3Q, prevBlock, "no prev block while deleting a block");
26638
- newRange = createBlockSimpleRange(editor, prevBlock, getBlockTextLength$6(editor, prevBlock));
26639
- } else {
26640
- const nextBlock = getNextVisibleBlock(block);
26641
- assert(logger$3Q, nextBlock, "no prev and next block while deleting a block");
26642
- newRange = createBlockSimpleRange(editor, nextBlock, 0);
26658
+ if (prevBlock) {
26659
+ newRange = createBlockSimpleRange(editor, prevBlock, getBlockTextLength$6(editor, prevBlock));
26660
+ return newRange;
26661
+ }
26643
26662
  }
26663
+ const nextBlock = getNextVisibleBlock(block);
26664
+ assert(logger$3Q, nextBlock, "no prev and next block while deleting a block");
26665
+ newRange = createBlockSimpleRange(editor, nextBlock, 0);
26644
26666
  return newRange;
26645
26667
  }
26646
26668
  const logger$3P = getLogger("block-to-html");
@@ -31789,11 +31811,16 @@ ${codeText}
31789
31811
  return rangeResult;
31790
31812
  }
31791
31813
  }
31792
- const blocks = range.getSelectedBlocks();
31793
- blocks.forEach((b) => {
31794
- const childRange = createEditorSelectionRange(editor, { anchor: b.start, focus: b.end });
31795
- this.executeBlockCommand(editor, b.block, childRange, command, params, rangeResult);
31796
- });
31814
+ editor.doc.beginBatchUpdate();
31815
+ try {
31816
+ const blocks = range.getSelectedBlocks();
31817
+ blocks.forEach((b) => {
31818
+ const childRange = createEditorSelectionRange(editor, { anchor: b.start, focus: b.end });
31819
+ this.executeBlockCommand(editor, b.block, childRange, command, params, rangeResult);
31820
+ });
31821
+ } finally {
31822
+ editor.doc.endBatchUpdate();
31823
+ }
31797
31824
  if (!clientType.isMobile) {
31798
31825
  editor.focus();
31799
31826
  }
@@ -95302,7 +95329,7 @@ ${JSON.stringify(error2, null, 2)}`);
95302
95329
  }
95303
95330
  }
95304
95331
  });
95305
- editor.version = "2.9.8-beta.15";
95332
+ editor.version = "2.9.8-beta.17";
95306
95333
  return editor;
95307
95334
  }
95308
95335
  function isDoc(doc2) {
@@ -95434,7 +95461,7 @@ ${JSON.stringify(error2, null, 2)}`);
95434
95461
  OnesEditorDropTarget.register(editor);
95435
95462
  OnesEditorTocProvider.register(editor);
95436
95463
  OnesEditorExclusiveBlock.register(editor);
95437
- editor.version = "2.9.8-beta.15";
95464
+ editor.version = "2.9.8-beta.17";
95438
95465
  return editor;
95439
95466
  }
95440
95467
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.9.8-beta.15",
3
+ "version": "2.9.8-beta.17",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {