@ones-editor/editor 2.1.7-beta.18 → 2.1.7-beta.19
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
|
@@ -24083,8 +24083,9 @@ var __publicField = (obj, key, value) => {
|
|
|
24083
24083
|
}
|
|
24084
24084
|
}
|
|
24085
24085
|
const logger$3K = getLogger("block-to-text");
|
|
24086
|
-
function textBlockToHtml(editor,
|
|
24086
|
+
function textBlockToHtml(editor, blockData, doc2) {
|
|
24087
24087
|
let html = "";
|
|
24088
|
+
const ops = blockData.text || [];
|
|
24088
24089
|
ops.forEach((op) => {
|
|
24089
24090
|
assert(logger$3K, typeof op.insert === "string", "invalid op");
|
|
24090
24091
|
if (op.attributes && op.attributes.box === true) {
|
|
@@ -24153,6 +24154,13 @@ var __publicField = (obj, key, value) => {
|
|
|
24153
24154
|
if (!html) {
|
|
24154
24155
|
html = "<br>";
|
|
24155
24156
|
}
|
|
24157
|
+
if (blockData.heading && typeof blockData.heading === "number") {
|
|
24158
|
+
if (blockData.heading >= 1 && blockData.heading <= 6) {
|
|
24159
|
+
html = `<h${blockData.heading}>${html}</h${blockData.heading}>`;
|
|
24160
|
+
return html;
|
|
24161
|
+
}
|
|
24162
|
+
html = `<strong>${html}</strong> `;
|
|
24163
|
+
}
|
|
24156
24164
|
return `<p>${html}</p>`;
|
|
24157
24165
|
}
|
|
24158
24166
|
const logger$3J = getLogger("text-block");
|
|
@@ -24224,7 +24232,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24224
24232
|
if (type === "markdown") {
|
|
24225
24233
|
return textBlockToMarkdown(editor, blockData, doc2);
|
|
24226
24234
|
}
|
|
24227
|
-
return textBlockToHtml(editor, blockData
|
|
24235
|
+
return textBlockToHtml(editor, blockData, doc2);
|
|
24228
24236
|
}
|
|
24229
24237
|
function blockToDoc$1(srcDoc, srcBlockData, s, info) {
|
|
24230
24238
|
const blockData = cloneDeep__default.default(srcBlockData);
|
|
@@ -87810,7 +87818,7 @@ ${data2.flowchartText}
|
|
|
87810
87818
|
}
|
|
87811
87819
|
}
|
|
87812
87820
|
});
|
|
87813
|
-
editor.version = "2.1.7-beta.
|
|
87821
|
+
editor.version = "2.1.7-beta.19";
|
|
87814
87822
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
87815
87823
|
window.setReauthFail = (fail) => {
|
|
87816
87824
|
window.isReauthError = fail;
|
|
@@ -87929,7 +87937,7 @@ ${data2.flowchartText}
|
|
|
87929
87937
|
}
|
|
87930
87938
|
}
|
|
87931
87939
|
OnesEditorToolbar.register(editor);
|
|
87932
|
-
editor.version = "2.1.7-beta.
|
|
87940
|
+
editor.version = "2.1.7-beta.19";
|
|
87933
87941
|
return editor;
|
|
87934
87942
|
}
|
|
87935
87943
|
async function showDocVersions(editor, options, serverUrl) {
|