opentiny 6.9.5 → 6.9.7

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/tinymce.js CHANGED
@@ -21399,7 +21399,11 @@
21399
21399
  };
21400
21400
  const emptyEditor = editor => {
21401
21401
  return Optional.some(() => {
21402
- editor.setContent('');
21402
+ if (editor.hasEditableRoot()) {
21403
+ editor.setContent('');
21404
+ } else {
21405
+ editor.setContent(`<div class=${ editor.getParam('editable_class') }>${ editor.getParam('placeholder') }</div>`);
21406
+ }
21403
21407
  editor.selection.setCursorLocation();
21404
21408
  });
21405
21409
  };
@@ -25915,12 +25919,9 @@
25915
25919
  return tag + '>';
25916
25920
  };
25917
25921
  const toBlockElements = (text, rootTag, rootAttrs) => {
25918
- const blocks = text.split(/\n\n/);
25922
+ const paragraphs = text.split(/\n/);
25919
25923
  const tagOpen = openContainer(rootTag, rootAttrs);
25920
25924
  const tagClose = '</' + rootTag + '>';
25921
- const paragraphs = map$3(blocks, p => {
25922
- return p.split(/\n/).join('<br />');
25923
- });
25924
25925
  const stitch = p => {
25925
25926
  return tagOpen + p + tagClose;
25926
25927
  };