@firecms/editor 3.0.0-beta.10 → 3.0.0-beta.11

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.
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { Editor } from "@tiptap/react";
3
+ import { Node as ProseMirrorNode } from "prosemirror-model";
4
+ export interface CustomBlockComponentProps {
5
+ node: ProseMirrorNode;
6
+ updateAttributes: (attrs: Record<string, any>) => void;
7
+ getPos: () => number;
8
+ editor: Editor;
9
+ }
10
+ export declare const CustomComponent: React.FC<CustomBlockComponentProps>;
package/dist/editor.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { type JSONContent } from "./components";
2
3
  import { EditorAIController } from "./types";
3
4
  export type FireCMSEditorTextSize = "sm" | "base" | "lg";
@@ -15,5 +16,10 @@ export type FireCMSEditorProps = {
15
16
  };
16
17
  aiController?: EditorAIController;
17
18
  onDisabledAutocompleteClick?: () => void;
19
+ customComponents?: CustomEditorComponent[];
20
+ };
21
+ export type CustomEditorComponent = {
22
+ name: string;
23
+ component: React.FC;
18
24
  };
19
25
  export declare const FireCMSEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, onDisabledAutocompleteClick }: FireCMSEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,11 @@ export declare const placeholder: import("@tiptap/core").Extension<import("@tipt
2
2
  export declare const tiptapLink: import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any>;
3
3
  export declare const taskList: import("@tiptap/core").Node<import("@tiptap/extension-task-list").TaskListOptions, any>;
4
4
  export declare const taskItem: import("@tiptap/core").Node<import("@tiptap/extension-task-item").TaskItemOptions, any>;
5
- export declare const markdownExtension: import("@tiptap/core").Extension<import("tiptap-markdown").MarkdownOptions, import("tiptap-markdown").MarkdownStorage>;
6
5
  export declare const horizontalRule: import("@tiptap/core").Node<import("@tiptap/extension-horizontal-rule").HorizontalRuleOptions, any>;
6
+ export declare const bulletList: import("@tiptap/core").Node<import("@tiptap/extension-bullet-list").BulletListOptions, any>;
7
+ export declare const orderedList: import("@tiptap/core").Node<import("@tiptap/extension-ordered-list").OrderedListOptions, any>;
8
+ export declare const listItem: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
9
+ export declare const blockquote: import("@tiptap/core").Node<import("@tiptap/extension-blockquote").BlockquoteOptions, any>;
10
+ export declare const codeBlock: import("@tiptap/core").Node<import("@tiptap/extension-code-block").CodeBlockOptions, any>;
11
+ export declare const code: import("@tiptap/core").Mark<import("@tiptap/extension-code").CodeOptions, any>;
7
12
  export declare const starterKit: import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any>;
@@ -0,0 +1,7 @@
1
+ import { Node, NodeViewProps } from "@tiptap/core";
2
+ export type CustomBlockComponentProps = NodeViewProps;
3
+ export interface CustomBlockOptions {
4
+ component: React.ComponentType<CustomBlockComponentProps> | null;
5
+ delimiter?: string;
6
+ }
7
+ export declare const CustomBlock: Node<CustomBlockOptions, any>;