@ones-editor/editor 2.2.14-beta.19 → 2.2.14-beta.20

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
@@ -81525,7 +81525,7 @@ ${content}
81525
81525
  textarea2.focus();
81526
81526
  textarea2.scrollTop = 0;
81527
81527
  textarea2.style.height = `${textarea2.scrollHeight}px`;
81528
- });
81528
+ }, 20);
81529
81529
  };
81530
81530
  const getCodeEditor = (block) => {
81531
81531
  const textarea2 = block.querySelector(".embed-code-editor-textarea");
@@ -81730,7 +81730,7 @@ ${content}
81730
81730
  return;
81731
81731
  }
81732
81732
  const blockData = this.editor.getBlockData(block);
81733
- const { view, flex = DEFAULT_FLEX } = this.getGraphData(blockData);
81733
+ const { view, flex = DEFAULT_FLEX, code } = this.getGraphData(blockData);
81734
81734
  if (exclusive) {
81735
81735
  (_a = this.viewSelect) == null ? void 0 : _a.setSelectedView(ViewId.Draw);
81736
81736
  this.updateLayout(ViewId.Draw, flex);
@@ -81738,6 +81738,8 @@ ${content}
81738
81738
  const realView = this.getRealView(view);
81739
81739
  (_b = this.viewSelect) == null ? void 0 : _b.setSelectedView(realView);
81740
81740
  this.updateLayout(realView, flex);
81741
+ const textarea2 = getCodeEditor(block);
81742
+ textarea2.value = code;
81741
81743
  }
81742
81744
  });
81743
81745
  __publicField(this, "handleReadonlyChanged", (editor) => {
@@ -81944,10 +81946,6 @@ ${content}
81944
81946
  if (((_a = this.viewSelect) == null ? void 0 : _a.selectedView) !== realView) {
81945
81947
  (_b = this.viewSelect) == null ? void 0 : _b.setSelectedView(realView);
81946
81948
  }
81947
- if (realView !== ViewId.Draw) {
81948
- const textarea2 = getCodeEditor(blockElement);
81949
- textarea2.value = code;
81950
- }
81951
81949
  this.updateLayout(realView, flex);
81952
81950
  this.updateDraw(src, code);
81953
81951
  this.updateHeight(content, height);
@@ -83311,7 +83309,10 @@ ${data2.flowchartText}
83311
83309
  code2ObjectUrl(code) {
83312
83310
  return Promise.resolve(plantumlCodeToUrl(this.editor, code));
83313
83311
  }
83314
- code2ResourceId(code) {
83312
+ async code2ResourceId(code) {
83313
+ if (!code) {
83314
+ return "";
83315
+ }
83315
83316
  const url = plantumlCodeToUrl(this.editor, code);
83316
83317
  return plantumlUrlToResourceId(this.editor, url);
83317
83318
  }
@@ -89181,7 +89182,7 @@ ${data2.plantumlText}
89181
89182
  }
89182
89183
  }
89183
89184
  });
89184
- editor.version = "2.2.14-beta.19";
89185
+ editor.version = "2.2.14-beta.20";
89185
89186
  return editor;
89186
89187
  }
89187
89188
  function isDoc(doc2) {
@@ -89283,7 +89284,7 @@ ${data2.plantumlText}
89283
89284
  });
89284
89285
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
89285
89286
  OnesEditorToolbar.register(editor);
89286
- editor.version = "2.2.14-beta.19";
89287
+ editor.version = "2.2.14-beta.20";
89287
89288
  return editor;
89288
89289
  }
89289
89290
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.2.14-beta.19",
3
+ "version": "2.2.14-beta.20",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {