@bizapps/design-system-testing 1.7.1 → 1.7.2
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.cjs +3 -1
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.d.cts +10 -1
- package/dist/editor.d.ts +10 -1
- package/dist/editor.js +3 -1
- package/dist/editor.js.map +1 -1
- package/package.json +1 -1
package/dist/editor.d.cts
CHANGED
|
@@ -221,6 +221,15 @@ interface UseRichTextEditorOptions {
|
|
|
221
221
|
contentClassName?: string;
|
|
222
222
|
/** Allows data: URIs in images. Off by default: uploads belong in storage. */
|
|
223
223
|
allowBase64Images?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Merged into the editor's `editorProps`. For behaviour only a product can
|
|
226
|
+
* define — clamping pasted tables to a contract's row limit, say.
|
|
227
|
+
*
|
|
228
|
+
* `attributes` and `handleClick` are set by the hook and are not overridable:
|
|
229
|
+
* they carry the accessible name and the link shortcut, which are the
|
|
230
|
+
* defaults consumers were getting wrong by hand.
|
|
231
|
+
*/
|
|
232
|
+
editorProps?: Omit<NonNullable<EditorOptions['editorProps']>, 'attributes' | 'handleClick'>;
|
|
224
233
|
}
|
|
225
234
|
interface UseRichTextEditorResult {
|
|
226
235
|
editor: Editor | null;
|
|
@@ -245,7 +254,7 @@ interface UseRichTextEditorResult {
|
|
|
245
254
|
* What stays with the consumer is what only it can know: the marks its document
|
|
246
255
|
* contract allows, and the copy. Both arrive as options.
|
|
247
256
|
*/
|
|
248
|
-
declare function useRichTextEditor({ labels, onUpdate, content, onInsertLink, onInsertImage, extraExtensions, extraToolbar, contentClassName, allowBase64Images, }: UseRichTextEditorOptions): UseRichTextEditorResult;
|
|
257
|
+
declare function useRichTextEditor({ labels, onUpdate, content, onInsertLink, onInsertImage, extraExtensions, extraToolbar, contentClassName, allowBase64Images, editorProps, }: UseRichTextEditorOptions): UseRichTextEditorResult;
|
|
249
258
|
|
|
250
259
|
/**
|
|
251
260
|
* One entry in the palette.
|
package/dist/editor.d.ts
CHANGED
|
@@ -221,6 +221,15 @@ interface UseRichTextEditorOptions {
|
|
|
221
221
|
contentClassName?: string;
|
|
222
222
|
/** Allows data: URIs in images. Off by default: uploads belong in storage. */
|
|
223
223
|
allowBase64Images?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Merged into the editor's `editorProps`. For behaviour only a product can
|
|
226
|
+
* define — clamping pasted tables to a contract's row limit, say.
|
|
227
|
+
*
|
|
228
|
+
* `attributes` and `handleClick` are set by the hook and are not overridable:
|
|
229
|
+
* they carry the accessible name and the link shortcut, which are the
|
|
230
|
+
* defaults consumers were getting wrong by hand.
|
|
231
|
+
*/
|
|
232
|
+
editorProps?: Omit<NonNullable<EditorOptions['editorProps']>, 'attributes' | 'handleClick'>;
|
|
224
233
|
}
|
|
225
234
|
interface UseRichTextEditorResult {
|
|
226
235
|
editor: Editor | null;
|
|
@@ -245,7 +254,7 @@ interface UseRichTextEditorResult {
|
|
|
245
254
|
* What stays with the consumer is what only it can know: the marks its document
|
|
246
255
|
* contract allows, and the copy. Both arrive as options.
|
|
247
256
|
*/
|
|
248
|
-
declare function useRichTextEditor({ labels, onUpdate, content, onInsertLink, onInsertImage, extraExtensions, extraToolbar, contentClassName, allowBase64Images, }: UseRichTextEditorOptions): UseRichTextEditorResult;
|
|
257
|
+
declare function useRichTextEditor({ labels, onUpdate, content, onInsertLink, onInsertImage, extraExtensions, extraToolbar, contentClassName, allowBase64Images, editorProps, }: UseRichTextEditorOptions): UseRichTextEditorResult;
|
|
249
258
|
|
|
250
259
|
/**
|
|
251
260
|
* One entry in the palette.
|
package/dist/editor.js
CHANGED
|
@@ -1027,7 +1027,8 @@ function useRichTextEditor({
|
|
|
1027
1027
|
extraExtensions = [],
|
|
1028
1028
|
extraToolbar = [],
|
|
1029
1029
|
contentClassName,
|
|
1030
|
-
allowBase64Images = false
|
|
1030
|
+
allowBase64Images = false,
|
|
1031
|
+
editorProps
|
|
1031
1032
|
}) {
|
|
1032
1033
|
const [linkNeedsText, setLinkNeedsText] = useState(false);
|
|
1033
1034
|
const editor = useEditor({
|
|
@@ -1050,6 +1051,7 @@ function useRichTextEditor({
|
|
|
1050
1051
|
// repaint as the selection and attributes change.
|
|
1051
1052
|
shouldRerenderOnTransaction: true,
|
|
1052
1053
|
editorProps: {
|
|
1054
|
+
...editorProps,
|
|
1053
1055
|
attributes: {
|
|
1054
1056
|
// ProseMirror's editable div needs its own accessible name: a
|
|
1055
1057
|
// visible <Label> beside it is decoration, and a screen reader
|