@firecms/editor 3.0.0-canary.280 → 3.0.0-canary.282

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.es.js CHANGED
@@ -1871,14 +1871,12 @@ const suggestionItems = [{
1871
1871
  input.click();
1872
1872
  }
1873
1873
  }];
1874
- const CustomDocument = Document.extend({
1875
- // content: 'heading block*',
1876
- });
1877
1874
  const proseClasses = {
1878
1875
  "sm": "prose-sm",
1879
1876
  "base": "prose-base",
1880
1877
  "lg": "prose-lg"
1881
1878
  };
1879
+ const canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
1882
1880
  const FireCMSEditor = ({
1883
1881
  content,
1884
1882
  onJsonContentChange,
@@ -1939,7 +1937,7 @@ const FireCMSEditor = ({
1939
1937
  }
1940
1938
  };
1941
1939
  const proseClass = proseClasses[textSize];
1942
- const extensions = useMemo(() => [starterKit, CustomDocument, HighlightDecorationExtension(highlight), TextLoadingDecorationExtension, Underline, Bold, TextStyleKit, Italic, Strike, Color, Highlight.configure({
1940
+ const extensions = useMemo(() => [starterKit, Document.extend({}), HighlightDecorationExtension(highlight), TextLoadingDecorationExtension, Underline, Bold, TextStyleKit, Italic, Strike, Color, Highlight.configure({
1943
1941
  multicolor: true
1944
1942
  }), Heading, CustomKeymap, DragAndDrop, placeholder, tiptapLink, imageExtension, taskList, taskItem, Markdown.configure({
1945
1943
  html: true
@@ -1952,7 +1950,7 @@ const FireCMSEditor = ({
1952
1950
  aiController
1953
1951
  })
1954
1952
  })], []);
1955
- return /* @__PURE__ */ jsx("div", { ref, className: "relative min-h-[300px] w-full", children: /* @__PURE__ */ jsx(EditorProvider, { content: content ?? "", extensions, editorProps: {
1953
+ return /* @__PURE__ */ jsx("div", { ref, className: "relative min-h-[300px] w-full", children: /* @__PURE__ */ jsx(EditorProvider, { content: content ?? "", extensions, immediatelyRender: canUseDOM, editorProps: {
1956
1954
  editable: () => !disabled,
1957
1955
  attributes: {
1958
1956
  class: cls(proseClass, "prose-headings:font-title font-default focus:outline-none max-w-full p-12")