@ones-editor/editor 2.5.1-beta.5 → 2.5.1-beta.8
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
|
@@ -73878,6 +73878,22 @@ ${codeText}
|
|
|
73878
73878
|
}
|
|
73879
73879
|
}];
|
|
73880
73880
|
}
|
|
73881
|
+
if (token.type === "image") {
|
|
73882
|
+
const href = token.href || "";
|
|
73883
|
+
if (href) {
|
|
73884
|
+
const boxData = {
|
|
73885
|
+
id: genId(),
|
|
73886
|
+
created: Date.now(),
|
|
73887
|
+
box: true,
|
|
73888
|
+
type: "image",
|
|
73889
|
+
src: href
|
|
73890
|
+
};
|
|
73891
|
+
return [{
|
|
73892
|
+
insert: " ",
|
|
73893
|
+
attributes: boxData
|
|
73894
|
+
}];
|
|
73895
|
+
}
|
|
73896
|
+
}
|
|
73881
73897
|
logger$Q.warn(`unknown token in text: ${JSON.stringify(token)}`);
|
|
73882
73898
|
return [];
|
|
73883
73899
|
});
|
|
@@ -74219,15 +74235,24 @@ ${codeText}
|
|
|
74219
74235
|
children: []
|
|
74220
74236
|
};
|
|
74221
74237
|
const groups = groupTokens(tokens);
|
|
74222
|
-
groups.forEach((
|
|
74223
|
-
const token = tokens2[0];
|
|
74238
|
+
groups.forEach((childTokens, index2) => {
|
|
74224
74239
|
if (index2 === 0) {
|
|
74240
|
+
const token = childTokens[0];
|
|
74225
74241
|
if (isInlineToken(token)) {
|
|
74226
|
-
ret.text = tokensToText(
|
|
74242
|
+
ret.text = tokensToText(childTokens, {}, options);
|
|
74227
74243
|
return;
|
|
74228
74244
|
}
|
|
74229
74245
|
}
|
|
74230
|
-
|
|
74246
|
+
if (childTokens.every((token) => isInlineToken(token))) {
|
|
74247
|
+
const blockText = tokensToText(childTokens, {}, options);
|
|
74248
|
+
ret.children.push({
|
|
74249
|
+
id: genId(),
|
|
74250
|
+
type: "text",
|
|
74251
|
+
text: blockText
|
|
74252
|
+
});
|
|
74253
|
+
return;
|
|
74254
|
+
}
|
|
74255
|
+
ret.children.push(...tokensToBlocks(childTokens, options));
|
|
74231
74256
|
});
|
|
74232
74257
|
return ret;
|
|
74233
74258
|
}
|
|
@@ -92135,7 +92160,7 @@ ${data2.plantumlText}
|
|
|
92135
92160
|
}
|
|
92136
92161
|
}
|
|
92137
92162
|
});
|
|
92138
|
-
editor.version = "2.5.1-beta.
|
|
92163
|
+
editor.version = "2.5.1-beta.8";
|
|
92139
92164
|
return editor;
|
|
92140
92165
|
}
|
|
92141
92166
|
function isDoc(doc2) {
|
|
@@ -92248,7 +92273,7 @@ ${data2.plantumlText}
|
|
|
92248
92273
|
}
|
|
92249
92274
|
});
|
|
92250
92275
|
OnesEditorToolbar.register(editor);
|
|
92251
|
-
editor.version = "2.5.1-beta.
|
|
92276
|
+
editor.version = "2.5.1-beta.8";
|
|
92252
92277
|
return editor;
|
|
92253
92278
|
}
|
|
92254
92279
|
async function showDocVersions(editor, options, serverUrl) {
|