@ones-editor/editor 2.8.44 → 2.8.46

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
@@ -4049,9 +4049,6 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4049
4049
  height: 24px;
4050
4050
  justify-content: center;
4051
4051
  }
4052
- .comment-editor-root:not(.comment-editor-readonly) .editor-root .editor-content [data-type=editor-block]:not([data-block-type=text]) {
4053
- width: 224px;
4054
- }
4055
4052
  .comment-editor-editing {
4056
4053
  border: 1px solid #0064ff;
4057
4054
  }
@@ -7676,6 +7673,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
7676
7673
  font-size: 14px;
7677
7674
  font-weight: 400;
7678
7675
  line-height: 22px;
7676
+ font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
7679
7677
  }
7680
7678
  .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:focus,
7681
7679
  .embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:focus,
@@ -66421,20 +66419,22 @@ ${codeText}
66421
66419
  (_a = block.querySelector("[data-type=block-tools] .block-placeholder-container")) == null ? void 0 : _a.remove();
66422
66420
  }
66423
66421
  function applyPlaceholderToBlock(editor, block, placeholder2) {
66424
- var _a;
66425
66422
  removePlaceholderFromBlock(editor, block);
66426
- if (!isEmptyTextBlockWithoutCompositionText(editor, block)) {
66427
- return;
66428
- }
66429
- const contentElem = getBlockContent(block);
66430
- if (typeof placeholder2 === "string") {
66431
- contentElem.setAttribute("data-content-placeholder", placeholder2);
66432
- } else {
66433
- const tools = getBlockTools(block);
66434
- const placeholderContainer = (_a = tools.querySelector(".block-placeholder-container")) != null ? _a : createElement("div", ["block-placeholder-container"], tools);
66435
- placeholderContainer.innerHTML = "";
66436
- placeholderContainer.appendChild(placeholder2);
66437
- }
66423
+ setTimeout(() => {
66424
+ var _a;
66425
+ if (!isEmptyTextBlockWithoutCompositionText(editor, block)) {
66426
+ return;
66427
+ }
66428
+ const contentElem = getBlockContent(block);
66429
+ if (typeof placeholder2 === "string") {
66430
+ contentElem.setAttribute("data-content-placeholder", placeholder2);
66431
+ } else {
66432
+ const tools = getBlockTools(block);
66433
+ const placeholderContainer = (_a = tools.querySelector(".block-placeholder-container")) != null ? _a : createElement("div", ["block-placeholder-container"], tools);
66434
+ placeholderContainer.innerHTML = "";
66435
+ placeholderContainer.appendChild(placeholder2);
66436
+ }
66437
+ });
66438
66438
  }
66439
66439
  function getTextBlockPlaceholder(block) {
66440
66440
  const heading = block.getAttribute("data-style-heading");
@@ -69814,6 +69814,19 @@ ${codeText}
69814
69814
  iconUrl: comment.avatarUrl,
69815
69815
  mentionId: comment.userId
69816
69816
  };
69817
+ const blockText = editorGetBlockText(replyEditor.editor, focusBlock);
69818
+ let hasMention = false;
69819
+ blockText.forEach((textSegment) => {
69820
+ var _a, _b;
69821
+ if (((_a = textSegment.attributes) == null ? void 0 : _a.type) === "mention" && ((_b = textSegment.attributes) == null ? void 0 : _b.mentionId) === comment.userId) {
69822
+ hasMention = true;
69823
+ return;
69824
+ }
69825
+ });
69826
+ if (hasMention) {
69827
+ replyEditor.editor.focus();
69828
+ return;
69829
+ }
69817
69830
  replyEditor.editor.insertBoxToBlock(focusBlock, 0, mentionBoxData);
69818
69831
  });
69819
69832
  __publicField(this, "handleCommentItemMore", (groupItem) => {
@@ -93931,7 +93944,7 @@ ${JSON.stringify(error2, null, 2)}`);
93931
93944
  }
93932
93945
  }
93933
93946
  });
93934
- editor.version = "2.8.44";
93947
+ editor.version = "2.8.46";
93935
93948
  return editor;
93936
93949
  }
93937
93950
  function isDoc(doc2) {
@@ -94044,7 +94057,7 @@ ${JSON.stringify(error2, null, 2)}`);
94044
94057
  }
94045
94058
  });
94046
94059
  OnesEditorToolbar.register(editor);
94047
- editor.version = "2.8.44";
94060
+ editor.version = "2.8.46";
94048
94061
  return editor;
94049
94062
  }
94050
94063
  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.8.44",
3
+ "version": "2.8.46",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {