@ones-editor/editor 2.8.45-beta.1 → 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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +31 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7673,6 +7673,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
|
|
|
7673
7673
|
font-size: 14px;
|
|
7674
7674
|
font-weight: 400;
|
|
7675
7675
|
line-height: 22px;
|
|
7676
|
+
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
7676
7677
|
}
|
|
7677
7678
|
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:focus,
|
|
7678
7679
|
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:focus,
|
|
@@ -66418,20 +66419,22 @@ ${codeText}
|
|
|
66418
66419
|
(_a = block.querySelector("[data-type=block-tools] .block-placeholder-container")) == null ? void 0 : _a.remove();
|
|
66419
66420
|
}
|
|
66420
66421
|
function applyPlaceholderToBlock(editor, block, placeholder2) {
|
|
66421
|
-
var _a;
|
|
66422
66422
|
removePlaceholderFromBlock(editor, block);
|
|
66423
|
-
|
|
66424
|
-
|
|
66425
|
-
|
|
66426
|
-
|
|
66427
|
-
|
|
66428
|
-
contentElem
|
|
66429
|
-
|
|
66430
|
-
|
|
66431
|
-
|
|
66432
|
-
|
|
66433
|
-
|
|
66434
|
-
|
|
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
|
+
});
|
|
66435
66438
|
}
|
|
66436
66439
|
function getTextBlockPlaceholder(block) {
|
|
66437
66440
|
const heading = block.getAttribute("data-style-heading");
|
|
@@ -69811,6 +69814,19 @@ ${codeText}
|
|
|
69811
69814
|
iconUrl: comment.avatarUrl,
|
|
69812
69815
|
mentionId: comment.userId
|
|
69813
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
|
+
}
|
|
69814
69830
|
replyEditor.editor.insertBoxToBlock(focusBlock, 0, mentionBoxData);
|
|
69815
69831
|
});
|
|
69816
69832
|
__publicField(this, "handleCommentItemMore", (groupItem) => {
|
|
@@ -93928,7 +93944,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
93928
93944
|
}
|
|
93929
93945
|
}
|
|
93930
93946
|
});
|
|
93931
|
-
editor.version = "2.8.
|
|
93947
|
+
editor.version = "2.8.46";
|
|
93932
93948
|
return editor;
|
|
93933
93949
|
}
|
|
93934
93950
|
function isDoc(doc2) {
|
|
@@ -94041,7 +94057,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94041
94057
|
}
|
|
94042
94058
|
});
|
|
94043
94059
|
OnesEditorToolbar.register(editor);
|
|
94044
|
-
editor.version = "2.8.
|
|
94060
|
+
editor.version = "2.8.46";
|
|
94045
94061
|
return editor;
|
|
94046
94062
|
}
|
|
94047
94063
|
async function showDocVersions(editor, options, serverUrl) {
|