@ones-editor/editor 3.0.4-beta.102 → 3.0.4-beta.104

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
@@ -7964,6 +7964,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
7964
7964
  font-size: 14px;
7965
7965
  font-weight: 400;
7966
7966
  line-height: 22px;
7967
+ font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
7967
7968
  }
7968
7969
  .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:focus,
7969
7970
  .embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:focus,
@@ -67390,11 +67391,11 @@ ${codeText}
67390
67391
  }
67391
67392
  function applyPlaceholderToBlock(editor, block, placeholder2) {
67392
67393
  removePlaceholderFromBlock(editor, block);
67393
- if (!isEmptyTextBlockWithoutCompositionText(editor, block)) {
67394
- return;
67395
- }
67396
67394
  setTimeout(() => {
67397
67395
  var _a;
67396
+ if (!isEmptyTextBlockWithoutCompositionText(editor, block)) {
67397
+ return;
67398
+ }
67398
67399
  const contentElem = getBlockContent(block);
67399
67400
  if (typeof placeholder2 === "string") {
67400
67401
  contentElem.setAttribute("data-content-placeholder", placeholder2);
@@ -70911,6 +70912,19 @@ ${codeText}
70911
70912
  iconUrl: comment.avatarUrl,
70912
70913
  mentionId: comment.userId
70913
70914
  };
70915
+ const blockText = editorGetBlockText(replyEditor.editor, focusBlock);
70916
+ let hasMention = false;
70917
+ blockText.forEach((textSegment) => {
70918
+ var _a, _b;
70919
+ if (((_a = textSegment.attributes) == null ? void 0 : _a.type) === "mention" && ((_b = textSegment.attributes) == null ? void 0 : _b.mentionId) === comment.userId) {
70920
+ hasMention = true;
70921
+ return;
70922
+ }
70923
+ });
70924
+ if (hasMention) {
70925
+ replyEditor.editor.focus();
70926
+ return;
70927
+ }
70914
70928
  replyEditor.editor.insertBoxToBlock(focusBlock, 0, mentionBoxData);
70915
70929
  });
70916
70930
  __publicField(this, "handleCommentItemMore", (groupItem) => {
@@ -96684,7 +96698,7 @@ ${JSON.stringify(error2, null, 2)}`);
96684
96698
  }
96685
96699
  }
96686
96700
  });
96687
- editor.version = "3.0.4-beta.102";
96701
+ editor.version = "3.0.4-beta.104";
96688
96702
  return editor;
96689
96703
  }
96690
96704
  function isDoc(doc2) {
@@ -96818,7 +96832,7 @@ ${JSON.stringify(error2, null, 2)}`);
96818
96832
  OnesEditorDropTarget.register(editor);
96819
96833
  OnesEditorTocProvider.register(editor);
96820
96834
  OnesEditorExclusiveBlock.register(editor);
96821
- editor.version = "3.0.4-beta.102";
96835
+ editor.version = "3.0.4-beta.104";
96822
96836
  return editor;
96823
96837
  }
96824
96838
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "3.0.4-beta.102",
3
+ "version": "3.0.4-beta.104",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {