@ones-editor/editor 0.0.9-beta.3 → 0.0.9-beta.4
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 +12 -10
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71422,12 +71422,13 @@ ${data.flowchartText}
|
|
|
71422
71422
|
FileBox
|
|
71423
71423
|
];
|
|
71424
71424
|
function createHistoryEditor(root2, doc2, options) {
|
|
71425
|
-
var _a, _b, _c;
|
|
71425
|
+
var _a, _b, _c, _d;
|
|
71426
|
+
Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
|
|
71426
71427
|
const editor = createEditor(root2, doc2, {
|
|
71427
71428
|
components: {
|
|
71428
|
-
blocks: [...StandardBlocks, ...((
|
|
71429
|
-
embeds: [...StandardEmbeds, ...((
|
|
71430
|
-
boxes: [...StandardBoxes, ...((
|
|
71429
|
+
blocks: [...StandardBlocks, ...((_b = options == null ? void 0 : options.components) == null ? void 0 : _b.blocks) || []],
|
|
71430
|
+
embeds: [...StandardEmbeds, ...((_c = options.components) == null ? void 0 : _c.embeds) || []],
|
|
71431
|
+
boxes: [...StandardBoxes, ...((_d = options.components) == null ? void 0 : _d.boxes) || []],
|
|
71431
71432
|
textRenders: [new BlockPaddingRender()],
|
|
71432
71433
|
options: { ...options.componentsOptions }
|
|
71433
71434
|
}
|
|
@@ -73123,7 +73124,7 @@ ${data.flowchartText}
|
|
|
73123
73124
|
return doc2.toJSON !== void 0;
|
|
73124
73125
|
}
|
|
73125
73126
|
async function createLocalEditor(root2, docData, options) {
|
|
73126
|
-
var _a, _b, _c, _d, _e;
|
|
73127
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73127
73128
|
assert(logger, root2, "app does not exists");
|
|
73128
73129
|
const doc2 = isDoc(docData) ? docData : new LocalDoc(docData, {
|
|
73129
73130
|
serverUrl: options.serverUrl || ""
|
|
@@ -73131,6 +73132,7 @@ ${data.flowchartText}
|
|
|
73131
73132
|
if (options.lang) {
|
|
73132
73133
|
i18n$1.setLang(options.lang);
|
|
73133
73134
|
}
|
|
73135
|
+
Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
|
|
73134
73136
|
const editor = createEditor(root2, doc2, {
|
|
73135
73137
|
id: options.id,
|
|
73136
73138
|
scrollContainer: options == null ? void 0 : options.scrollContainer,
|
|
@@ -73138,11 +73140,11 @@ ${data.flowchartText}
|
|
|
73138
73140
|
blocks: [TableBlock, CodeBlock, CodeLineBlock, ListBlock],
|
|
73139
73141
|
commandProviders: [new TableBlockCommandProvider()],
|
|
73140
73142
|
decorators: [new CodeTextDecorator(), new RemoteCaretsDecorator()],
|
|
73141
|
-
embeds: [...StandardEmbeds, ...((
|
|
73142
|
-
boxes: [MathjaxBox, MentionBox, FileBox, ...((
|
|
73143
|
+
embeds: [...StandardEmbeds, ...((_b = options.components) == null ? void 0 : _b.embeds) || []],
|
|
73144
|
+
boxes: [MathjaxBox, MentionBox, FileBox, ...((_c = options.components) == null ? void 0 : _c.boxes) || []],
|
|
73143
73145
|
insertions: [RemoteCaretsInsertion],
|
|
73144
|
-
blockHooks: [new BlockLockerHook(), ...((
|
|
73145
|
-
textRenders: [new OnesEditorCommentsRender(), new BlockPaddingRender(), ...((
|
|
73146
|
+
blockHooks: [new BlockLockerHook(), ...((_d = options.components) == null ? void 0 : _d.blockHooks) || []],
|
|
73147
|
+
textRenders: [new OnesEditorCommentsRender(), new BlockPaddingRender(), ...((_e = options.components) == null ? void 0 : _e.textRenders) || []],
|
|
73146
73148
|
options: { ...options.componentsOptions }
|
|
73147
73149
|
},
|
|
73148
73150
|
shortcuts: [TableShortcuts, FindReplaceShortcuts, TextStyleShortcuts, DefaultShortcuts]
|
|
@@ -73157,7 +73159,7 @@ ${data.flowchartText}
|
|
|
73157
73159
|
readonlyTitlePlaceholder: i18n$1.t("placeholder.local.readonlyTitle"),
|
|
73158
73160
|
addPlaceholderToAllCurrentEmptyBlock: true
|
|
73159
73161
|
}));
|
|
73160
|
-
editor.input.addHandler(new OnesEditorQuickMenu(editor, (
|
|
73162
|
+
editor.input.addHandler(new OnesEditorQuickMenu(editor, (_f = options.componentsOptions) == null ? void 0 : _f.quickMenu));
|
|
73161
73163
|
editor.input.addHandler(new PasteSpecialHandler(editor));
|
|
73162
73164
|
editor.input.addHandler(new OnesEditorPasteHandler(editor));
|
|
73163
73165
|
editor.input.addHandler(new BlockLockerPasteHandler());
|
package/dist/types.d.ts
CHANGED