@bigbinary/neeto-editor 1.16.4 → 1.17.0
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/index.js +7 -7
- package/package.json +1 -1
- package/types.d.ts +29 -8
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -69,32 +69,45 @@ interface Config {
|
|
|
69
69
|
placeholder?: Partial<PlaceholderOptions>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
interface tooltip {
|
|
73
|
+
label: string;
|
|
74
|
+
keys: string[];
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
interface tooltips {
|
|
73
|
-
[key: string]:
|
|
78
|
+
[key: string]: tooltip;
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
interface MenuProps {
|
|
77
82
|
tooltips?: tooltips;
|
|
78
|
-
editor:
|
|
83
|
+
editor: TiptapEditor | null;
|
|
79
84
|
menuType?: "fixed" | "bubble" | "headless" | "none";
|
|
80
85
|
defaults?: string[];
|
|
81
86
|
addons?: string[];
|
|
82
87
|
uploadEndpoint?: string;
|
|
83
88
|
mentions?: Mention[];
|
|
84
|
-
|
|
89
|
+
editorSecrets?: Array<{ unsplash?: string }>;
|
|
90
|
+
variables?: (VariableCategory | Variable)[];
|
|
85
91
|
addonCommands?: Command[];
|
|
86
92
|
isIndependant?: boolean;
|
|
87
93
|
className?: string;
|
|
88
94
|
}
|
|
89
95
|
|
|
90
|
-
|
|
96
|
+
interface attachment {
|
|
91
97
|
filename?: string;
|
|
92
98
|
signedId?: string;
|
|
93
99
|
url?: string;
|
|
94
100
|
[otherProps: string]: any;
|
|
95
101
|
};
|
|
96
102
|
|
|
103
|
+
interface attachmentsConfig {
|
|
104
|
+
maxFileSize?: number,
|
|
105
|
+
maxNumberOfFiles?: number,
|
|
106
|
+
allowedFileTypes?: string[],
|
|
107
|
+
}
|
|
108
|
+
|
|
97
109
|
interface EditorProps {
|
|
110
|
+
attachmentsConfig?: attachmentsConfig;
|
|
98
111
|
tooltips?: tooltips;
|
|
99
112
|
initialValue?: string;
|
|
100
113
|
menuType?: "fixed" | "bubble" | "headless" | "none";
|
|
@@ -112,7 +125,7 @@ interface EditorProps {
|
|
|
112
125
|
onFocus?: EditorFocus;
|
|
113
126
|
onBlur?: EditorFocus;
|
|
114
127
|
onSubmit?: (htmlContent: string) => void;
|
|
115
|
-
variables
|
|
128
|
+
variables?: (VariableCategory | Variable)[];
|
|
116
129
|
mentions?: Mention[];
|
|
117
130
|
placeholder?: string;
|
|
118
131
|
extensions?: Array<Node | Extension>;
|
|
@@ -123,7 +136,7 @@ interface EditorProps {
|
|
|
123
136
|
error?: string;
|
|
124
137
|
config?: Config;
|
|
125
138
|
attachments?: Array<attachment>;
|
|
126
|
-
onChangeAttachments
|
|
139
|
+
onChangeAttachments?: (attachments: attachment[]) => void;
|
|
127
140
|
[otherProps: string]: any;
|
|
128
141
|
}
|
|
129
142
|
|
|
@@ -131,10 +144,11 @@ interface FormikEditorProps extends EditorProps {
|
|
|
131
144
|
name: string;
|
|
132
145
|
}
|
|
133
146
|
interface AttachmentsProps {
|
|
147
|
+
config?: attachmentsConfig;
|
|
134
148
|
endpoint?: string;
|
|
135
149
|
attachments?: Array<attachment>;
|
|
136
150
|
dragDropRef?: React.RefObject<HTMLDivElement>;
|
|
137
|
-
onChange
|
|
151
|
+
onChange?: (attachments: attachment[]) => void;
|
|
138
152
|
isIndependent?: boolean;
|
|
139
153
|
disabled?: boolean;
|
|
140
154
|
className?: string;
|
|
@@ -149,10 +163,17 @@ export function Attachments(props: AttachmentsProps): JSX.Element;
|
|
|
149
163
|
export function EditorContent(props: {
|
|
150
164
|
content?: string;
|
|
151
165
|
className?: string;
|
|
152
|
-
variables
|
|
166
|
+
variables?: (VariableCategory | Variable)[];
|
|
153
167
|
[otherProps: string]: any;
|
|
154
168
|
}): JSX.Element;
|
|
155
169
|
|
|
156
170
|
export function Menu(props: MenuProps): JSX.Element;
|
|
157
171
|
|
|
158
172
|
export function isEditorEmpty(htmlContent: string | null | undefined): boolean;
|
|
173
|
+
|
|
174
|
+
export function isEditorOverlaysActive(): boolean;
|
|
175
|
+
|
|
176
|
+
export function substituteVariables(
|
|
177
|
+
highlightedContent: string,
|
|
178
|
+
variables: (VariableCategory | Variable)[]
|
|
179
|
+
): string;
|