@sps-woodland/rich-text-editor 7.2.1 → 7.2.3
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/lib/RichTextEditor.css.d.ts +1 -1
- package/lib/hooks/useRTEContent.d.ts +1 -1
- package/lib/hooks/useRTESelectionListener.d.ts +2 -2
- package/lib/hooks/useRTEToolbarButtons.d.ts +2 -2
- package/lib/index.cjs.js +46 -43
- package/lib/index.es.js +4526 -4417
- package/package.json +27 -15
|
@@ -8,7 +8,7 @@ export declare const richTextEditor: import("@vanilla-extract/recipes/dist/decla
|
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
}>;
|
|
11
|
-
export
|
|
11
|
+
export type RichTextEditorVariants = Required<Parameters<typeof richTextEditor>>[0];
|
|
12
12
|
export declare const rteEditableDiv: typeof richTextEditor;
|
|
13
13
|
export declare const rteToolbar: string;
|
|
14
14
|
export declare const vr: string;
|
|
@@ -3,7 +3,7 @@ export interface RichTextEditorAggregateValue {
|
|
|
3
3
|
md: string;
|
|
4
4
|
html: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type RTEStateUpdateFromDiv = <T extends HTMLElement>(ref: RefObject<T>) => void;
|
|
7
7
|
export declare function useRTEContent(initMd?: string, initHtml?: string): {
|
|
8
8
|
aggValue?: RichTextEditorAggregateValue;
|
|
9
9
|
editableDivInnerHtml: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type ElementTest = (element: HTMLElement) => boolean;
|
|
2
|
+
export type SelectionDOMContextFind = (test?: ElementTest) => HTMLElement | null;
|
|
3
3
|
export declare function useRTESelectionListener(editableDivRef: any): {
|
|
4
4
|
selectionRange: Range | undefined;
|
|
5
5
|
selectionDOMContextFind: SelectionDOMContextFind;
|
|
@@ -2,10 +2,10 @@ import type { RefObject } from "react";
|
|
|
2
2
|
import type { RTEToolbarButton } from "../toolbar-button/RTEToolbarButton";
|
|
3
3
|
import type { LinkConfig } from "../RTELinkModal";
|
|
4
4
|
import type { SelectionDOMContextFind } from "./useRTESelectionListener";
|
|
5
|
-
|
|
5
|
+
type ToolbarButtonProps = Parameters<typeof RTEToolbarButton>[0] & {
|
|
6
6
|
key: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ToolbarButtonPartialProps = Omit<ToolbarButtonProps, "selectionDOMContextFind">;
|
|
9
9
|
export declare function useRTEToolbarButtons(selectionDOMContextFind: SelectionDOMContextFind, editableDivRef: RefObject<HTMLDivElement>): {
|
|
10
10
|
toolbarButtons: (ToolbarButtonPartialProps | "vr")[];
|
|
11
11
|
showLinkModal: boolean;
|