@firecms/editor 3.0.0 → 3.1.0-canary.1df3b2c

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.umd.js CHANGED
@@ -248,7 +248,7 @@
248
248
  t2 = $[3];
249
249
  }
250
250
  let t3;
251
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
251
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
252
252
  t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardArrowDownIcon, { size: "small" });
253
253
  $[4] = t3;
254
254
  } else {
@@ -327,7 +327,7 @@
327
327
  editor
328
328
  } = react.useCurrentEditor();
329
329
  let t1;
330
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
330
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
331
331
  t1 = () => {
332
332
  inputRef.current && inputRef.current?.focus();
333
333
  };
@@ -382,7 +382,7 @@
382
382
  t5 = $[8];
383
383
  }
384
384
  let t6;
385
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
385
+ if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
386
386
  t6 = ui.cls("text-surface-900 dark:text-white flex-grow bg-transparent p-1 text-sm outline-none", ui.focusedDisabled);
387
387
  $[9] = t6;
388
388
  } else {
@@ -1581,7 +1581,7 @@
1581
1581
  }
1582
1582
  const enterHandler = t3;
1583
1583
  let t4;
1584
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1584
+ if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1585
1585
  t4 = () => setSelectedIndex(0);
1586
1586
  $[15] = t4;
1587
1587
  } else {
@@ -1627,7 +1627,7 @@
1627
1627
  }
1628
1628
  React.useImperativeHandle(ref, t6);
1629
1629
  let t7;
1630
- if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
1630
+ if ($[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1631
1631
  t7 = [];
1632
1632
  $[22] = t7;
1633
1633
  } else {
@@ -1654,7 +1654,7 @@
1654
1654
  }
1655
1655
  React.useEffect(t8, t9);
1656
1656
  let t10;
1657
- if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
1657
+ if ($[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1658
1658
  t10 = ui.cls("text-surface-900 dark:text-white z-50 max-h-[280px] h-auto w-72 overflow-y-auto rounded-md border bg-white dark:bg-surface-900 px-1 py-2 shadow transition-all", ui.defaultBorderMixin);
1659
1659
  $[26] = t10;
1660
1660
  } else {
@@ -1889,7 +1889,8 @@
1889
1889
  highlight,
1890
1890
  handleImageUpload,
1891
1891
  aiController,
1892
- disabled
1892
+ disabled,
1893
+ markdownConfig
1893
1894
  }) => {
1894
1895
  const ref = React.useRef(null);
1895
1896
  const editorRef = React.useRef(null);
@@ -1942,7 +1943,8 @@
1942
1943
  const extensions = React.useMemo(() => [starterKit, Document.extend({}), HighlightDecorationExtension(highlight), TextLoadingDecorationExtension, Underline, Bold, extensionTextStyle.TextStyleKit, Italic, Strike, Color, Highlight.configure({
1943
1944
  multicolor: true
1944
1945
  }), Heading, CustomKeymap, DragAndDrop, placeholder, tiptapLink, imageExtension, taskList, taskItem, tiptapMarkdown.Markdown.configure({
1945
- html: true
1946
+ html: markdownConfig?.html ?? true,
1947
+ transformPastedText: markdownConfig?.transformPastedText ?? false
1946
1948
  }), horizontalRule, bulletList, orderedList, listItem, blockquote, codeBlock, code, SlashCommand.configure({
1947
1949
  HTMLAttributes: {
1948
1950
  class: "mention"
@@ -1951,7 +1953,7 @@
1951
1953
  upload: handleImageUpload,
1952
1954
  aiController
1953
1955
  })
1954
- })], []);
1956
+ })], [markdownConfig?.html, markdownConfig?.transformPastedText]);
1955
1957
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: "relative min-h-[300px] w-full", children: /* @__PURE__ */ jsxRuntime.jsx(react.EditorProvider, { content: content ?? "", extensions, immediatelyRender: canUseDOM, editorProps: {
1956
1958
  editable: () => !disabled,
1957
1959
  attributes: {