@ones-editor/editor 2.5.1-beta.3 → 2.5.1-beta.5

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
@@ -11147,11 +11147,10 @@ var __publicField = (obj, key, value) => {
11147
11147
  constructor(options) {
11148
11148
  __publicField(this, "cancelScroll", null);
11149
11149
  __publicField(this, "options");
11150
- __publicField(this, "scrollDomInfo");
11151
11150
  __publicField(this, "scrolling", false);
11152
11151
  __publicField(this, "getScrollingDirection", (e2) => {
11153
11152
  const { x, y } = e2;
11154
- const { top, bottom, left, right } = this.scrollDomInfo;
11153
+ const { top, bottom, left, right } = this.getScrollDomInfo();
11155
11154
  const { edge } = this.options;
11156
11155
  if (edge.top && y <= edge.top + top) {
11157
11156
  return "top";
@@ -11188,7 +11187,6 @@ var __publicField = (obj, key, value) => {
11188
11187
  }
11189
11188
  });
11190
11189
  this.options = options;
11191
- this.scrollDomInfo = this.getScrollDomInfo();
11192
11190
  }
11193
11191
  getScrollDomInfo() {
11194
11192
  const { scrollElement } = this.options;
@@ -73834,6 +73832,18 @@ ${codeText}
73834
73832
  }
73835
73833
  if (token.type === "html") {
73836
73834
  const html = token.text;
73835
+ const testBr = html.trim().toLowerCase();
73836
+ if (testBr === "<br>" || testBr === "<br/>" || testBr === "<br />") {
73837
+ return [{
73838
+ insert: " ",
73839
+ attributes: {
73840
+ id: genId(),
73841
+ created: Date.now(),
73842
+ box: true,
73843
+ type: "br"
73844
+ }
73845
+ }];
73846
+ }
73837
73847
  applyHtmlToText(html, attributes);
73838
73848
  applyColorTagToText(html, attributes);
73839
73849
  applyFontSizeTagToText(html, attributes);
@@ -92125,7 +92135,7 @@ ${data2.plantumlText}
92125
92135
  }
92126
92136
  }
92127
92137
  });
92128
- editor.version = "2.5.1-beta.3";
92138
+ editor.version = "2.5.1-beta.5";
92129
92139
  return editor;
92130
92140
  }
92131
92141
  function isDoc(doc2) {
@@ -92238,7 +92248,7 @@ ${data2.plantumlText}
92238
92248
  }
92239
92249
  });
92240
92250
  OnesEditorToolbar.register(editor);
92241
- editor.version = "2.5.1-beta.3";
92251
+ editor.version = "2.5.1-beta.5";
92242
92252
  return editor;
92243
92253
  }
92244
92254
  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.5.1-beta.3",
3
+ "version": "2.5.1-beta.5",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {