@firecms/editor 3.0.1 → 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/editor.d.ts +20 -1
- package/dist/index.es.js +5 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +29 -29
package/dist/index.umd.js
CHANGED
|
@@ -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: {
|