@ones-editor/editor 3.0.14 → 3.0.15-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/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from '../@ones-editor/layout-block';
30
30
  export * from '../@ones-editor/markdown-to-doc';
31
31
  export * from '../@ones-editor/html-to-doc';
32
32
  export * from '../@ones-editor/main-toolbar';
33
+ export * from '../@ones-editor/mention';
33
34
  export { Popup, ManualMenu, OnesEditorAutoSuggest, tippy, ManualToolbar, ManualCloseDialog, TextColorItem, shouldFocusToEditor, FixedToolbar, } from '../@ones-editor/ui-base';
34
35
  export * from '../@ones-editor/drawio-embed';
35
36
  export * from '../@ones-editor/block-resizer';
@@ -108,3 +109,4 @@ export interface ShowDocVersionsOptions2 {
108
109
  editorOptions?: CreateOnesEditorOptions;
109
110
  }
110
111
  export declare function showDocVersions2(parent: HTMLElement, options: ShowDocVersionsOptions2): Promise<OnesEditorVersionsDialog>;
112
+ export declare function createSimpleInput(root: HTMLElement, docData: DocObject | OnesEditorDoc, options: CreateLocalEditorOptions): Promise<OnesEditor>;
package/dist/index.js CHANGED
@@ -7798,6 +7798,38 @@ div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container
7798
7798
  }
7799
7799
  div.editor-root.readonly div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=drawio] [data-src] {
7800
7800
  cursor: zoom-in;
7801
+ }
7802
+ .command-item.menu-item[data-id=insert-drawio] {
7803
+ width: 100%;
7804
+ }
7805
+ .command-item.menu-item[data-id=insert-drawio] .uml-menu-item {
7806
+ color: #2d2d2e;
7807
+ user-select: none;
7808
+ transition: background 20ms ease-in 0s;
7809
+ width: 100%;
7810
+ height: 32px;
7811
+ padding: 6px 10px;
7812
+ display: flex;
7813
+ align-items: center;
7814
+ box-sizing: border-box;
7815
+ }
7816
+ .command-item.menu-item[data-id=insert-drawio] .uml-menu-item .menu-item-icon {
7817
+ display: flex;
7818
+ align-items: center;
7819
+ justify-content: center;
7820
+ height: 24px;
7821
+ width: 24px;
7822
+ margin-right: 5px;
7823
+ margin-top: -2px;
7824
+ display: flex;
7825
+ flex-direction: column;
7826
+ justify-content: center;
7827
+ }
7828
+ .command-item.menu-item[data-id=insert-drawio] .uml-menu-item .menu-item-name {
7829
+ white-space: nowrap;
7830
+ flex-grow: 1;
7831
+ display: flex;
7832
+ align-items: center;
7801
7833
  }.embed-block[data-embed-type=mermaid],
7802
7834
  .embed-block[data-embed-type=flowchart],
7803
7835
  .embed-block[data-embed-type=plantuml] {
@@ -25212,20 +25244,20 @@ var __publicField = (obj, key, value) => {
25212
25244
  function textBlockToMarkdown(editor, blockData, doc2) {
25213
25245
  const richText2 = blockData.text || [];
25214
25246
  const text2 = textToMarkdownText(editor, richText2, doc2);
25215
- let markdown = text2;
25247
+ let markdown2 = text2;
25216
25248
  if (blockData.heading) {
25217
25249
  const heading = blockData.heading;
25218
25250
  const prefix = "#".repeat(heading);
25219
- markdown = `${prefix} ${markdown}`;
25251
+ markdown2 = `${prefix} ${markdown2}`;
25220
25252
  }
25221
25253
  if (blockData.quoted) {
25222
- markdown = `> ${markdown}`;
25254
+ markdown2 = `> ${markdown2}`;
25223
25255
  }
25224
25256
  if (blockData.type === "text") {
25225
- markdown = `${markdown}
25257
+ markdown2 = `${markdown2}
25226
25258
  `;
25227
25259
  }
25228
- return markdown;
25260
+ return markdown2;
25229
25261
  }
25230
25262
  function styleColorToColor$1(color) {
25231
25263
  switch (color) {
@@ -26890,8 +26922,8 @@ var __publicField = (obj, key, value) => {
26890
26922
  function docToMarkdown(editor, doc2) {
26891
26923
  const lines = doc2.blocks.root.map((b, index2) => blockToMarkdown(editor, b, doc2, [{ containerId: "root", blockIndex: index2 }]));
26892
26924
  lines[lines.length - 1] = lines[lines.length - 1].trimEnd();
26893
- const markdown = lines.join("\n");
26894
- return markdown;
26925
+ const markdown2 = lines.join("\n");
26926
+ return markdown2;
26895
26927
  }
26896
26928
  const logger$3O = getLogger("get-text-position");
26897
26929
  function editorGetTextPosition(editor, insertPos) {
@@ -28718,6 +28750,11 @@ var __publicField = (obj, key, value) => {
28718
28750
  addClass(editor.rootContainer, "select-all");
28719
28751
  selectParentContainer(editor, getFirstChildBlock(editor.rootContainer));
28720
28752
  }
28753
+ function editorClearAll(editor) {
28754
+ selectParentContainer(editor, getFirstChildBlock(editor.rootContainer));
28755
+ editorClearSelectedContents(editor);
28756
+ removeClass(editor.rootContainer, "select-all");
28757
+ }
28721
28758
  function editorSelectWord(editor) {
28722
28759
  const old = editor.selection.range.focus;
28723
28760
  if (!old.isSimple())
@@ -29894,13 +29931,13 @@ ${codeText}
29894
29931
  addMetaToDoc(editor, doc2);
29895
29932
  const htmlFragment = docToHtmlFragment(editor, doc2);
29896
29933
  injectDocToHtmlFragment(htmlFragment, doc2);
29897
- let markdown = "";
29934
+ let markdown2 = "";
29898
29935
  if (isSelectedCodeTextBlock(editor)) {
29899
29936
  const selectBlock = editor.selection.range.getSelectedBlocks()[0];
29900
29937
  const container = getParentContainer(selectBlock.block);
29901
29938
  const codeBlock2 = getParentBlock(container);
29902
29939
  if (codeBlock2) {
29903
- markdown = getSelectedCodeBlockMarkdown(editor, docToText(editor, doc2));
29940
+ markdown2 = getSelectedCodeBlockMarkdown(editor, docToText(editor, doc2));
29904
29941
  }
29905
29942
  } else {
29906
29943
  const lines = [];
@@ -29908,11 +29945,11 @@ ${codeText}
29908
29945
  lines.push(blockToMarkdown(editor, b, doc2, [{ containerId: "root", blockIndex: index2 }]));
29909
29946
  });
29910
29947
  lines[lines.length - 1] = lines[lines.length - 1].trimEnd();
29911
- markdown = lines.join("\n");
29948
+ markdown2 = lines.join("\n");
29912
29949
  }
29913
29950
  setClipboardData([{
29914
29951
  type: "text/plain",
29915
- data: new Blob([markdown], { type: "text/plain" })
29952
+ data: new Blob([markdown2], { type: "text/plain" })
29916
29953
  }]);
29917
29954
  return true;
29918
29955
  }
@@ -41800,7 +41837,9 @@ ${codeText}
41800
41837
  }
41801
41838
  }
41802
41839
  if (item.element) {
41803
- return;
41840
+ if (!item.useDefaultClickHandler) {
41841
+ return;
41842
+ }
41804
41843
  }
41805
41844
  this.emit("click", this, item, elem);
41806
41845
  if (item.clickToClose === false) {
@@ -42727,6 +42766,9 @@ ${codeText}
42727
42766
  function initMenuItem$1(item, elem) {
42728
42767
  var _a, _b;
42729
42768
  addClass(elem, "menu-item");
42769
+ if (item.className) {
42770
+ addClass(elem, ...item.className.split(" "));
42771
+ }
42730
42772
  if (item.element) {
42731
42773
  return;
42732
42774
  }
@@ -42802,6 +42844,9 @@ ${codeText}
42802
42844
  });
42803
42845
  }
42804
42846
  function initToolbarItem(item, elem, options) {
42847
+ if (item.className) {
42848
+ addClass(elem, ...item.className.split(" "));
42849
+ }
42805
42850
  elem.setAttribute("data-button-id", item.id);
42806
42851
  if (options.tooltipId && item.name && !item.disableTooltip) {
42807
42852
  elem.setAttribute(`data-editor-tooltip-${options.tooltipId}`, item.name);
@@ -52429,7 +52474,22 @@ ${codeText}
52429
52474
  var _a, _b, _c;
52430
52475
  const list2 = blockData;
52431
52476
  if (type === "text") {
52432
- const text2 = ((_a = TextBlock.convertTo) == null ? void 0 : _a.call(TextBlock, editor, blockData, doc2, "text", path)) || "";
52477
+ let text2 = ((_a = TextBlock.convertTo) == null ? void 0 : _a.call(TextBlock, editor, blockData, doc2, "text", path)) || "";
52478
+ if (path.length === 1) {
52479
+ if (list2.checkbox === "checked") {
52480
+ text2 = `[x] ${text2}`;
52481
+ } else if (list2.checkbox === "unchecked") {
52482
+ text2 = `[ ] ${text2}`;
52483
+ }
52484
+ if (list2.ordered) {
52485
+ text2 = `${list2.start}. ${text2}`;
52486
+ } else {
52487
+ text2 = `- ${text2}`;
52488
+ }
52489
+ const level = list2.level || 0;
52490
+ const prefix = level > 0 ? " ".repeat(level - 1) : "";
52491
+ text2 = prefix + text2;
52492
+ }
52433
52493
  return text2;
52434
52494
  }
52435
52495
  if (type === "markdown") {
@@ -67217,9 +67277,11 @@ ${codeText}
67217
67277
  });
67218
67278
  return true;
67219
67279
  }
67220
- function matchBlockStyle(editor, containerId, blockIndex, offset) {
67221
- if (matchHeading(editor, containerId, blockIndex, offset)) {
67222
- return true;
67280
+ function matchBlockStyle(editor, containerId, blockIndex, offset, options) {
67281
+ if ((options == null ? void 0 : options.disableHeadingShortcuts) !== true) {
67282
+ if (matchHeading(editor, containerId, blockIndex, offset)) {
67283
+ return true;
67284
+ }
67223
67285
  }
67224
67286
  if (matchBlockQuote(editor, containerId, blockIndex, offset)) {
67225
67287
  return true;
@@ -67324,6 +67386,9 @@ ${codeText}
67324
67386
  return false;
67325
67387
  }
67326
67388
  class MarkdownInputHandler {
67389
+ constructor(options) {
67390
+ this.options = options;
67391
+ }
67327
67392
  handleAfterInsertText(editor, containerId, blockIndex, offset, text2) {
67328
67393
  const block = editor.getBlockByIndex(containerId, blockIndex);
67329
67394
  if (isTitleBlock$2(block)) {
@@ -67333,7 +67398,7 @@ ${codeText}
67333
67398
  if (converterIntercept(editor, containerId)) {
67334
67399
  return false;
67335
67400
  }
67336
- if (matchBlockStyle(editor, containerId, blockIndex, offset)) {
67401
+ if (matchBlockStyle(editor, containerId, blockIndex, offset, this.options)) {
67337
67402
  return true;
67338
67403
  }
67339
67404
  if (matchTextStyle(editor, containerId, blockIndex, offset)) {
@@ -69873,8 +69938,8 @@ ${codeText}
69873
69938
  return images.map((image) => `<img data-embed-type="image" data-uuid="image:${image.src}" src="${editor.doc.buildResourceUrl(image.src, { withToken: true })}">`).join("");
69874
69939
  }
69875
69940
  if (type === "markdown") {
69876
- const markdown = images.map((image) => `![img](${editor.doc.buildResourceUrl(image.src, { withToken: true })})`).join("\n");
69877
- return `${markdown}
69941
+ const markdown2 = images.map((image) => `![img](${editor.doc.buildResourceUrl(image.src, { withToken: true })})`).join("\n");
69942
+ return `${markdown2}
69878
69943
  `;
69879
69944
  }
69880
69945
  return "";
@@ -75299,8 +75364,8 @@ ${codeText}
75299
75364
  }
75300
75365
  lines.push(rowText);
75301
75366
  }
75302
- const markdown = lines.join("\n");
75303
- return `${markdown}
75367
+ const markdown2 = lines.join("\n");
75368
+ return `${markdown2}
75304
75369
  `;
75305
75370
  }
75306
75371
  if (type === "html") {
@@ -76343,6 +76408,11 @@ ${codeText}
76343
76408
  }
76344
76409
  const logger$S = getLogger("custom-tag-to-text");
76345
76410
  function customTagToText(token, attributes, options) {
76411
+ var _a;
76412
+ const processed = (_a = options.customTagProcess) == null ? void 0 : _a.call(options, token, attributes);
76413
+ if (processed) {
76414
+ return processed;
76415
+ }
76346
76416
  const content = token.content;
76347
76417
  try {
76348
76418
  const base64 = content;
@@ -76555,7 +76625,7 @@ ${codeText}
76555
76625
  return createTextWithReplaceSoftReturn(htmlDecode(token.text), attributes);
76556
76626
  }
76557
76627
  if (token.type === "custom-tag") {
76558
- return customTagToText(token, attributes);
76628
+ return customTagToText(token, attributes, options);
76559
76629
  }
76560
76630
  if (token.type === "latex") {
76561
76631
  return [{
@@ -77018,9 +77088,9 @@ ${codeText}
77018
77088
  });
77019
77089
  marked.marked.use(extendedCustomTag());
77020
77090
  marked.marked.use(confluenceTextTag());
77021
- function markdownToDoc(markdown, options) {
77091
+ function markdownToDoc(markdown2, options) {
77022
77092
  const lexer = new marked.marked.Lexer();
77023
- const tokens = lexer.lex(markdown);
77093
+ const tokens = lexer.lex(markdown2);
77024
77094
  const doc2 = {
77025
77095
  blocks: {
77026
77096
  root: []
@@ -77035,7 +77105,8 @@ ${codeText}
77035
77105
  tokensToBlocks,
77036
77106
  tokensToTextWithChildren,
77037
77107
  htmlToDoc: options == null ? void 0 : options.htmlToDoc,
77038
- listLevel: 1
77108
+ listLevel: 1,
77109
+ customTagProcess: options == null ? void 0 : options.customTagProcess
77039
77110
  };
77040
77111
  const rootBlocks = tokensToBlocks(tokens, tokenToBlockOptions);
77041
77112
  if (rootBlocks.length === 0) {
@@ -77048,6 +77119,13 @@ ${codeText}
77048
77119
  doc2.blocks.root.push(...rootBlocks);
77049
77120
  return doc2;
77050
77121
  }
77122
+ const markdown = `
77123
+ [[cursor]]
77124
+ `;
77125
+ setTimeout(() => {
77126
+ const doc2 = markdownToDoc(markdown);
77127
+ console.log(doc2);
77128
+ }, 100);
77051
77129
  function extend(destination) {
77052
77130
  for (let i = 1; i < arguments.length; i++) {
77053
77131
  const source = arguments[i];
@@ -78613,9 +78691,9 @@ ${docStr}
78613
78691
  htmlFragment = html.substring(start + "<!--StartFragment-->".length, end);
78614
78692
  }
78615
78693
  }
78616
- const markdown = turndownService.turndown(htmlFragment);
78617
- logger$P.debug(`markdown: ${markdown}`);
78618
- return markdownToDoc(markdown, {
78694
+ const markdown2 = turndownService.turndown(htmlFragment);
78695
+ logger$P.debug(`markdown: ${markdown2}`);
78696
+ return markdownToDoc(markdown2, {
78619
78697
  htmlToDoc: (html2) => {
78620
78698
  const doc2 = htmlToDocByMarkdown(html2, options);
78621
78699
  return doc2;
@@ -88397,7 +88475,12 @@ ${data2.flowchartText}
88397
88475
  function getBlockProperties$3(editor, block) {
88398
88476
  const properties = getStandardEmbedBlockProperties(editor, block, {
88399
88477
  handleExecuteCommand: (editor2, block2, item) => {
88478
+ var _a, _b;
88400
88479
  if (item.id === "edit") {
88480
+ const drawioOptions = getDrawioOptions(editor2);
88481
+ if (((_b = (_a = drawioOptions.callbacks) == null ? void 0 : _a.onBeforeInsertDrawio) == null ? void 0 : _b.call(_a, editor2)) === false) {
88482
+ return true;
88483
+ }
88401
88484
  const data2 = editor2.getBlockData(block2).embedData;
88402
88485
  editGraph(editor2, block2, data2, false);
88403
88486
  return true;
@@ -88585,30 +88668,51 @@ ${data2.flowchartText}
88585
88668
  update(editor, embed, data2);
88586
88669
  return true;
88587
88670
  }
88588
- function getOptions$3() {
88589
- return {
88590
- name: "UML",
88591
- insertEmbedCommandItems: [{
88671
+ function getOptions$3(editor) {
88672
+ var _a;
88673
+ const drawioOptions = getDrawioOptions(editor);
88674
+ const suffixElem = (_a = drawioOptions.menuItemSuffix) == null ? void 0 : _a.call(drawioOptions, editor);
88675
+ const element = suffixElem ? () => {
88676
+ const root2 = createElement("div", ["uml-menu-item"], null);
88677
+ const iconElem = createElement("div", ["menu-item-icon"], root2);
88678
+ iconElem.innerHTML = UmlIcon;
88679
+ createElement("div", ["menu-item-name"], root2, i18n$1.t("drawio.title"));
88680
+ root2.appendChild(suffixElem);
88681
+ return root2;
88682
+ } : void 0;
88683
+ const insertEmbedCommandItems = [];
88684
+ if (drawioOptions.visible !== false) {
88685
+ insertEmbedCommandItems.push({
88592
88686
  id: "insert-drawio",
88593
88687
  name: i18n$1.t("drawio.title"),
88594
88688
  icon: UmlIcon,
88595
88689
  group: "common",
88596
88690
  order: 600,
88597
- subText: getShortcutById("insert-drawio")
88598
- }],
88599
- handleInsertEmptyEmbed: async (editor, options) => {
88691
+ subText: getShortcutById("insert-drawio"),
88692
+ element,
88693
+ useDefaultClickHandler: true
88694
+ });
88695
+ }
88696
+ return {
88697
+ name: "UML",
88698
+ insertEmbedCommandItems,
88699
+ handleInsertEmptyEmbed: async (editor2, options) => {
88700
+ var _a2, _b;
88701
+ if (((_b = (_a2 = drawioOptions.callbacks) == null ? void 0 : _a2.onBeforeInsertDrawio) == null ? void 0 : _b.call(_a2, editor2)) === false) {
88702
+ return null;
88703
+ }
88600
88704
  const embedData = {
88601
88705
  src: "",
88602
88706
  xml: "",
88603
88707
  xmlSvg: ""
88604
88708
  };
88605
- const block = editor.insertEmbed(options.containerId, options.blockIndex, "drawio", embedData);
88709
+ const block = editor2.insertEmbed(options.containerId, options.blockIndex, "drawio", embedData);
88606
88710
  setTimeout(() => {
88607
88711
  const blockContent = getBlockContent(block);
88608
88712
  const embed = blockContent.querySelector(":scope > .editor-drawio-content");
88609
88713
  assert(logger$i, embed, "embed should not be null");
88610
- const blockData = editor.getBlockData(block);
88611
- editDrawIO(editor, block, embed, blockData.embedData);
88714
+ const blockData = editor2.getBlockData(block);
88715
+ editDrawIO(editor2, block, embed, blockData.embedData);
88612
88716
  }, 100);
88613
88717
  return block;
88614
88718
  }
@@ -96317,9 +96421,8 @@ ${JSON.stringify(error2, null, 2)}`);
96317
96421
  }
96318
96422
  const elem = node;
96319
96423
  const refId = elem.getAttribute("data-ref-id");
96320
- const refType = elem.getAttribute("data-ref-type");
96321
96424
  const uuid = elem.getAttribute("data-uuid");
96322
- return Boolean(refType === "task" && refId && uuid);
96425
+ return Boolean(refId && uuid);
96323
96426
  },
96324
96427
  replacement: (content, node) => {
96325
96428
  const refType = node.getAttribute("data-ref-type");
@@ -96857,7 +96960,7 @@ ${JSON.stringify(error2, null, 2)}`);
96857
96960
  }
96858
96961
  }
96859
96962
  });
96860
- editor.version = "3.0.14";
96963
+ editor.version = "3.0.15-beta.2";
96861
96964
  return editor;
96862
96965
  }
96863
96966
  function isDoc(doc2) {
@@ -96991,7 +97094,7 @@ ${JSON.stringify(error2, null, 2)}`);
96991
97094
  OnesEditorDropTarget.register(editor);
96992
97095
  OnesEditorTocProvider.register(editor);
96993
97096
  OnesEditorExclusiveBlock.register(editor);
96994
- editor.version = "3.0.14";
97097
+ editor.version = "3.0.15-beta.2";
96995
97098
  return editor;
96996
97099
  }
96997
97100
  async function showDocVersions(editor, options, serverUrl) {
@@ -97058,6 +97161,77 @@ ${JSON.stringify(error2, null, 2)}`);
97058
97161
  dialog.show(dialogOptions);
97059
97162
  return dialog;
97060
97163
  }
97164
+ async function createSimpleInput(root2, docData, options) {
97165
+ var _a, _b, _c, _d, _e, _f, _g, _h;
97166
+ assert(logger, root2, "app does not exists");
97167
+ const doc2 = isDoc(docData) ? docData : new LocalDoc(docData, {
97168
+ serverUrl: options.serverUrl || ""
97169
+ });
97170
+ if (options.lang) {
97171
+ i18n$1.setLang(options.lang);
97172
+ }
97173
+ Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
97174
+ const editor = createEditor(root2, doc2, {
97175
+ id: options.id,
97176
+ scrollContainer: options == null ? void 0 : options.scrollContainer,
97177
+ enableResolveComments: false,
97178
+ enableComments: false,
97179
+ dateTimeFormatter: options.dateTimeFormatter,
97180
+ components: {
97181
+ blocks: [ListBlock, ...(_c = (_b = options.components) == null ? void 0 : _b.blocks) != null ? _c : []],
97182
+ commandProviders: [],
97183
+ decorators: [],
97184
+ embeds: [...((_d = options.components) == null ? void 0 : _d.embeds) || []],
97185
+ boxes: [...((_e = options.components) == null ? void 0 : _e.boxes) || []],
97186
+ insertions: [],
97187
+ blockHooks: [...((_f = options.components) == null ? void 0 : _f.blockHooks) || []],
97188
+ textRenders: [
97189
+ ...((_g = options.components) == null ? void 0 : _g.textRenders) || []
97190
+ ].filter(Boolean),
97191
+ options: { ...options.componentsOptions }
97192
+ },
97193
+ shortcuts: [TextStyleShortcuts, DefaultShortcuts]
97194
+ });
97195
+ if (options.compact) {
97196
+ addClass(editor.rootElement, "compact");
97197
+ if (options.headingButton === false)
97198
+ addClass(editor.rootElement, "no-heading-collapse");
97199
+ if (options.blockMenuButton === false)
97200
+ addClass(editor.rootElement, "no-block-menu");
97201
+ }
97202
+ editor.input.addHandler(new MarkdownInputHandler({
97203
+ disableHeadingShortcuts: true
97204
+ }));
97205
+ editor.input.addHandler(new OnesEditorPasteHandler(editor));
97206
+ editor.input.addHandler(new ListPasteHandler());
97207
+ editor.doc.registerCallback(new HeadingBlockDocEvents(editor));
97208
+ if (!clientType.isMobile) {
97209
+ editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
97210
+ }
97211
+ editor.addCustom("create-options", () => new OnesEditorCustomDataWrapper(editor, options));
97212
+ if ((_h = options.componentsOptions) == null ? void 0 : _h.mention) {
97213
+ const mentionOptions = options.componentsOptions.mention;
97214
+ editor.addCustom("mention", () => new OnesEditorMention(editor, mentionOptions));
97215
+ }
97216
+ if (options.autoNewLine) {
97217
+ editor.addCustom("auto-new-line", () => new AutoNewLine(editor));
97218
+ }
97219
+ editor.addListener("clickLink", (editor2, event, link2) => {
97220
+ var _a2;
97221
+ if ((_a2 = options == null ? void 0 : options.events) == null ? void 0 : _a2.onClickLink) {
97222
+ options.events.onClickLink(editor2, event, link2);
97223
+ return;
97224
+ }
97225
+ const href = link2.getAttribute("link") || link2.getAttribute("href");
97226
+ if (href) {
97227
+ if (editor2.readonly || event.ctrlKey || event.metaKey || !getParentBlock(link2)) {
97228
+ window.open(href, "_blank");
97229
+ }
97230
+ }
97231
+ });
97232
+ editor.version = "3.0.15-beta.2";
97233
+ return editor;
97234
+ }
97061
97235
  const emojis$1 = {
97062
97236
  smileysAndPeople: [
97063
97237
  "\u{1F600}",
@@ -142961,6 +143135,7 @@ ${JSON.stringify(error2, null, 2)}`);
142961
143135
  exports2.MathMenuIcon = MathMenuIcon;
142962
143136
  exports2.MaxUserError = MaxUserError;
142963
143137
  exports2.Mention2Icon = Mention2Icon;
143138
+ exports2.MentionBox = MentionBox;
142964
143139
  exports2.MentionIcon = MentionIcon;
142965
143140
  exports2.MergeCellIcon = MergeCellIcon;
142966
143141
  exports2.Mindmap = Mindmap;
@@ -142973,12 +143148,14 @@ ${JSON.stringify(error2, null, 2)}`);
142973
143148
  exports2.MoreItem = MoreItem;
142974
143149
  exports2.NextIcon = NextIcon;
142975
143150
  exports2.OnesEditorAutoSuggest = OnesEditorAutoSuggest;
143151
+ exports2.OnesEditorBlockMention = OnesEditorBlockMention;
142976
143152
  exports2.OnesEditorComments = OnesEditorComments;
142977
143153
  exports2.OnesEditorCommentsRender = OnesEditorCommentsRender;
142978
143154
  exports2.OnesEditorCustomDataWrapper = OnesEditorCustomDataWrapper;
142979
143155
  exports2.OnesEditorExclusiveBlock = OnesEditorExclusiveBlock;
142980
143156
  exports2.OnesEditorHoveringBlock = OnesEditorHoveringBlock;
142981
143157
  exports2.OnesEditorIcons = index$f;
143158
+ exports2.OnesEditorMention = OnesEditorMention;
142982
143159
  exports2.OnesEditorQuickMenu = OnesEditorQuickMenu;
142983
143160
  exports2.OnesEditorToc = OnesEditorToc;
142984
143161
  exports2.OnesEditorTocProvider = OnesEditorTocProvider;
@@ -143176,6 +143353,7 @@ ${JSON.stringify(error2, null, 2)}`);
143176
143353
  exports2.createSeparator = createSeparator;
143177
143354
  exports2.createSimpleBlockPosition = createSimpleBlockPosition;
143178
143355
  exports2.createSimpleDocPos = createSimpleDocPos;
143356
+ exports2.createSimpleInput = createSimpleInput;
143179
143357
  exports2.createTextBlockData = createTextBlockData;
143180
143358
  exports2.createTextButton = createTextButton;
143181
143359
  exports2.createTextOp = createTextOp;
@@ -143202,6 +143380,7 @@ ${JSON.stringify(error2, null, 2)}`);
143202
143380
  exports2.editorAutoBreakTextBlock = editorAutoBreakTextBlock;
143203
143381
  exports2.editorAutoInsertBlock = editorAutoInsertBlock;
143204
143382
  exports2.editorBreakTextBlock = editorBreakTextBlock;
143383
+ exports2.editorClearAll = editorClearAll;
143205
143384
  exports2.editorClearCompositionText = editorClearCompositionText;
143206
143385
  exports2.editorClearSelectedContents = editorClearSelectedContents;
143207
143386
  exports2.editorCopyBlock = editorCopyBlock;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "3.0.14",
3
+ "version": "3.0.15-beta.2",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {