@ones-editor/editor 2.8.37-beta.4 → 2.8.37-beta.6
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.d.ts +1 -1
- package/dist/index.js +37 -22
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export { resetListStart, getListAllNextBrothers, toMindmap, Mindmap } from '../@
|
|
|
42
42
|
export * from '../@ones-editor/exclusive-block';
|
|
43
43
|
export * from '../@ones-editor/templates';
|
|
44
44
|
export * from 'tiny-typed-emitter';
|
|
45
|
-
export { ShareDBDocVersionsProvider, OnesEditorIcons, isLayoutBlock, LayoutQuickMenuItemFilter, CalloutQuickMenuItemFilter, MobileCommandHandler, PasteSpecialHandler };
|
|
45
|
+
export { ShareDBDocVersionsProvider, OnesEditorIcons, isLayoutBlock, LayoutQuickMenuItemFilter, CalloutQuickMenuItemFilter, MobileCommandHandler, PasteSpecialHandler, };
|
|
46
46
|
export type { FileBoxData, FileEmbedData } from '../@ones-editor/file';
|
|
47
47
|
export * from './helper';
|
|
48
48
|
export { OnesEditorComments, OnesEditorCommentsRender } from '../@ones-editor/comments';
|
package/dist/index.js
CHANGED
|
@@ -94518,15 +94518,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94518
94518
|
TextColorShortcuts,
|
|
94519
94519
|
...options.shortcuts || []
|
|
94520
94520
|
],
|
|
94521
|
-
colors: [
|
|
94522
|
-
"#B21B57",
|
|
94523
|
-
"#008796",
|
|
94524
|
-
"#7241CC",
|
|
94525
|
-
"#CC4C08",
|
|
94526
|
-
"#5D8F00",
|
|
94527
|
-
"#BD2C1C",
|
|
94528
|
-
"#D17D00"
|
|
94529
|
-
]
|
|
94521
|
+
colors: ["#B21B57", "#008796", "#7241CC", "#CC4C08", "#5D8F00", "#BD2C1C", "#D17D00"]
|
|
94530
94522
|
};
|
|
94531
94523
|
return ret;
|
|
94532
94524
|
}
|
|
@@ -94624,10 +94616,13 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94624
94616
|
editor.input.addHandler(new ListPasteHandler());
|
|
94625
94617
|
editor.doc.registerCallback(new HeadingBlockDocEvents(editor));
|
|
94626
94618
|
editor.addCustom("remote-cursor", () => new RemoteCarets(editor));
|
|
94627
|
-
editor.addCustom(
|
|
94628
|
-
|
|
94629
|
-
(
|
|
94630
|
-
|
|
94619
|
+
editor.addCustom(
|
|
94620
|
+
"editor-image-preview",
|
|
94621
|
+
() => new ImagePreviewHandler(editor, (editor2, img) => {
|
|
94622
|
+
var _a2, _b2;
|
|
94623
|
+
(_b2 = (_a2 = options.events) == null ? void 0 : _a2.onPreviewImage) == null ? void 0 : _b2.call(_a2, editor2, img);
|
|
94624
|
+
})
|
|
94625
|
+
);
|
|
94631
94626
|
if (options.blockMenuButton !== false) {
|
|
94632
94627
|
editor.addCustom("block-menu", (editor2) => new OnesEditorBlockMenuButtons(editor2));
|
|
94633
94628
|
}
|
|
@@ -94677,7 +94672,9 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94677
94672
|
OnesEditorTocProvider.register(editor);
|
|
94678
94673
|
OnesEditorExclusiveBlock.register(editor);
|
|
94679
94674
|
if (!clientType.isMobile) {
|
|
94680
|
-
editor.editorCommandProviders.registerCommandProvider(
|
|
94675
|
+
editor.editorCommandProviders.registerCommandProvider(
|
|
94676
|
+
new TextCommandProvider(editor, { scriptDropDown: true, isFilter: true })
|
|
94677
|
+
);
|
|
94681
94678
|
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
94682
94679
|
} else {
|
|
94683
94680
|
editor.addCustom("mobile-helper", () => new OnesEditorMobileHelper(editor));
|
|
@@ -94724,14 +94721,14 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94724
94721
|
}
|
|
94725
94722
|
}
|
|
94726
94723
|
});
|
|
94727
|
-
editor.version = "2.8.37-beta.
|
|
94724
|
+
editor.version = "2.8.37-beta.6";
|
|
94728
94725
|
return editor;
|
|
94729
94726
|
}
|
|
94730
94727
|
function isDoc(doc2) {
|
|
94731
94728
|
return doc2.toJSON !== void 0;
|
|
94732
94729
|
}
|
|
94733
94730
|
async function createLocalEditor(root2, docData, options) {
|
|
94734
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
94731
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
94735
94732
|
assert(logger, root2, "app does not exists");
|
|
94736
94733
|
const doc2 = isDoc(docData) ? docData : new LocalDoc(docData, {
|
|
94737
94734
|
serverUrl: options.serverUrl || ""
|
|
@@ -94787,10 +94784,13 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94787
94784
|
editor.input.addHandler(new OnesEditorPasteHandler(editor));
|
|
94788
94785
|
editor.input.addHandler(new BlockLockerPasteHandler());
|
|
94789
94786
|
editor.input.addHandler(new ListPasteHandler());
|
|
94790
|
-
editor.addCustom(
|
|
94791
|
-
|
|
94792
|
-
(
|
|
94793
|
-
|
|
94787
|
+
editor.addCustom(
|
|
94788
|
+
"editor-image-preview",
|
|
94789
|
+
() => new ImagePreviewHandler(editor, (editor2, img) => {
|
|
94790
|
+
var _a2, _b2;
|
|
94791
|
+
(_b2 = (_a2 = options.events) == null ? void 0 : _a2.onPreviewImage) == null ? void 0 : _b2.call(_a2, editor2, img);
|
|
94792
|
+
})
|
|
94793
|
+
);
|
|
94794
94794
|
if (options.blockMenuButton !== false) {
|
|
94795
94795
|
editor.addCustom("block-menu", (editor2) => new OnesEditorBlockMenuButtons(editor2));
|
|
94796
94796
|
}
|
|
@@ -94800,7 +94800,9 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94800
94800
|
return new OnesEditorQuickMenu(editor, (_a2 = options.componentsOptions) == null ? void 0 : _a2.quickMenu);
|
|
94801
94801
|
});
|
|
94802
94802
|
editor.addCustom("block-menu", (editor2) => new OnesEditorBlockMenuButtons(editor2));
|
|
94803
|
-
editor.editorCommandProviders.registerCommandProvider(
|
|
94803
|
+
editor.editorCommandProviders.registerCommandProvider(
|
|
94804
|
+
new TextCommandProvider(editor, { scriptDropDown: true, isFilter: true })
|
|
94805
|
+
);
|
|
94804
94806
|
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
94805
94807
|
(_k = editor.findCustom("editor-quick-menu")) == null ? void 0 : _k.addFilter("layout-quick-menu-filter", LayoutQuickMenuItemFilter.init(editor));
|
|
94806
94808
|
(_l = editor.findCustom("editor-block-menu")) == null ? void 0 : _l.addFilter("layout-quick-menu-filter", LayoutQuickMenuItemFilter.init(editor));
|
|
@@ -94818,6 +94820,16 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94818
94820
|
if (options.enableContextMenu !== false) {
|
|
94819
94821
|
editor.addCustom("editor-context-menu", (editor2) => new OnesEditorContextMenu(editor2));
|
|
94820
94822
|
}
|
|
94823
|
+
editor.addCustom("create-options", () => new OnesEditorCustomDataWrapper(editor, options));
|
|
94824
|
+
editor.addCustom("drop-target", () => new OnesEditorDropTarget(editor));
|
|
94825
|
+
editor.addCustom("list-to-mindmap", () => new OnesEditorListMindmap(editor));
|
|
94826
|
+
editor.addCustom("list-to-mention", () => new OnesEditorBlockMention(editor));
|
|
94827
|
+
editor.addCustom("code-caret", () => new OnesEditorCodeCaret(editor));
|
|
94828
|
+
editor.addCustom("layout-paste-handler", () => new LayoutBlockCaptionInputHandler(editor, true));
|
|
94829
|
+
if ((_m = options.componentsOptions) == null ? void 0 : _m.mention) {
|
|
94830
|
+
const mentionOptions = options.componentsOptions.mention;
|
|
94831
|
+
editor.addCustom("mention", () => new OnesEditorMention(editor, mentionOptions));
|
|
94832
|
+
}
|
|
94821
94833
|
if (options.headingButton !== false) {
|
|
94822
94834
|
editor.addCustom("heading-collapse", () => new HeadingBlockCollapseButton(editor));
|
|
94823
94835
|
}
|
|
@@ -94838,7 +94850,10 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94838
94850
|
}
|
|
94839
94851
|
});
|
|
94840
94852
|
OnesEditorToolbar.register(editor);
|
|
94841
|
-
editor
|
|
94853
|
+
OnesEditorDropTarget.register(editor);
|
|
94854
|
+
OnesEditorTocProvider.register(editor);
|
|
94855
|
+
OnesEditorExclusiveBlock.register(editor);
|
|
94856
|
+
editor.version = "2.8.37-beta.6";
|
|
94842
94857
|
return editor;
|
|
94843
94858
|
}
|
|
94844
94859
|
async function showDocVersions(editor, options, serverUrl) {
|