@ones-editor/editor 3.0.3-beta.1 → 3.0.3-beta.2
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 +10 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -95968,7 +95968,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95968
95968
|
}
|
|
95969
95969
|
}
|
|
95970
95970
|
});
|
|
95971
|
-
editor.version = "3.0.3-beta.
|
|
95971
|
+
editor.version = "3.0.3-beta.2";
|
|
95972
95972
|
return editor;
|
|
95973
95973
|
}
|
|
95974
95974
|
function isDoc(doc2) {
|
|
@@ -96102,7 +96102,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96102
96102
|
OnesEditorDropTarget.register(editor);
|
|
96103
96103
|
OnesEditorTocProvider.register(editor);
|
|
96104
96104
|
OnesEditorExclusiveBlock.register(editor);
|
|
96105
|
-
editor.version = "3.0.3-beta.
|
|
96105
|
+
editor.version = "3.0.3-beta.2";
|
|
96106
96106
|
return editor;
|
|
96107
96107
|
}
|
|
96108
96108
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -96169,7 +96169,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96169
96169
|
return dialog;
|
|
96170
96170
|
}
|
|
96171
96171
|
async function createSimpleInput(root2, docData, options) {
|
|
96172
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
96172
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
96173
96173
|
assert(logger, root2, "app does not exists");
|
|
96174
96174
|
const doc2 = isDoc(docData) ? docData : new LocalDoc(docData, {
|
|
96175
96175
|
serverUrl: options.serverUrl || ""
|
|
@@ -96178,7 +96178,6 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96178
96178
|
i18n$1.setLang(options.lang);
|
|
96179
96179
|
}
|
|
96180
96180
|
Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
|
|
96181
|
-
const quickMenu = (_c = (_b = options.componentsOptions) == null ? void 0 : _b.quickMenu) != null ? _c : { id: "quick-menu", trigger: ["/"], commandProviders: [] };
|
|
96182
96181
|
const editor = createEditor(root2, doc2, {
|
|
96183
96182
|
id: options.id,
|
|
96184
96183
|
scrollContainer: options == null ? void 0 : options.scrollContainer,
|
|
@@ -96186,17 +96185,17 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96186
96185
|
enableComments: false,
|
|
96187
96186
|
dateTimeFormatter: options.dateTimeFormatter,
|
|
96188
96187
|
components: {
|
|
96189
|
-
blocks: [ListBlock, ...(
|
|
96188
|
+
blocks: [ListBlock, ...(_c = (_b = options.components) == null ? void 0 : _b.blocks) != null ? _c : []],
|
|
96190
96189
|
commandProviders: [],
|
|
96191
96190
|
decorators: [],
|
|
96192
|
-
embeds: [...((
|
|
96193
|
-
boxes: [MentionBox, ...((
|
|
96191
|
+
embeds: [...((_d = options.components) == null ? void 0 : _d.embeds) || []],
|
|
96192
|
+
boxes: [MentionBox, ...((_e = options.components) == null ? void 0 : _e.boxes) || []],
|
|
96194
96193
|
insertions: [],
|
|
96195
|
-
blockHooks: [...((
|
|
96194
|
+
blockHooks: [...((_f = options.components) == null ? void 0 : _f.blockHooks) || []],
|
|
96196
96195
|
textRenders: [
|
|
96197
|
-
...((
|
|
96196
|
+
...((_g = options.components) == null ? void 0 : _g.textRenders) || []
|
|
96198
96197
|
].filter(Boolean),
|
|
96199
|
-
options: { ...options.componentsOptions
|
|
96198
|
+
options: { ...options.componentsOptions }
|
|
96200
96199
|
},
|
|
96201
96200
|
shortcuts: [TextStyleShortcuts, DefaultShortcuts]
|
|
96202
96201
|
});
|
|
@@ -96211,22 +96210,9 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96211
96210
|
editor.input.addHandler(new ListPasteHandler());
|
|
96212
96211
|
editor.doc.registerCallback(new HeadingBlockDocEvents(editor));
|
|
96213
96212
|
if (!clientType.isMobile) {
|
|
96214
|
-
editor.addCustom("editor-quick-menu", () => {
|
|
96215
|
-
var _a2;
|
|
96216
|
-
return new OnesEditorQuickMenu(editor, (_a2 = options.componentsOptions) == null ? void 0 : _a2.quickMenu);
|
|
96217
|
-
});
|
|
96218
|
-
editor.editorCommandProviders.registerCommandProvider(
|
|
96219
|
-
new TextCommandProvider(editor, { scriptDropDown: true, isFilter: true })
|
|
96220
|
-
);
|
|
96221
96213
|
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
96222
|
-
(_j = editor.findCustom("editor-quick-menu")) == null ? void 0 : _j.addFilter("layout-quick-menu-filter", LayoutQuickMenuItemFilter.init(editor));
|
|
96223
|
-
(_k = editor.findCustom("editor-block-menu")) == null ? void 0 : _k.addFilter("layout-quick-menu-filter", LayoutQuickMenuItemFilter.init(editor));
|
|
96224
96214
|
}
|
|
96225
96215
|
editor.addCustom("create-options", () => new OnesEditorCustomDataWrapper(editor, options));
|
|
96226
|
-
if ((_l = options.componentsOptions) == null ? void 0 : _l.mention) {
|
|
96227
|
-
const mentionOptions = options.componentsOptions.mention;
|
|
96228
|
-
editor.addCustom("mention", () => new OnesEditorMention(editor, mentionOptions));
|
|
96229
|
-
}
|
|
96230
96216
|
if (options.autoNewLine) {
|
|
96231
96217
|
editor.addCustom("auto-new-line", () => new AutoNewLine(editor));
|
|
96232
96218
|
}
|
|
@@ -96244,7 +96230,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96244
96230
|
}
|
|
96245
96231
|
});
|
|
96246
96232
|
OnesEditorToolbar.register(editor);
|
|
96247
|
-
editor.version = "3.0.3-beta.
|
|
96233
|
+
editor.version = "3.0.3-beta.2";
|
|
96248
96234
|
return editor;
|
|
96249
96235
|
}
|
|
96250
96236
|
const emojis$1 = {
|