rte-builder 1.0.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/LICENSE +21 -0
- package/README.md +418 -0
- package/dist/index.css +580 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +690 -0
- package/dist/index.d.ts +690 -0
- package/dist/index.js +8717 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +8715 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +121 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default from 'react';
|
|
3
|
+
import { Editor } from '@tiptap/react';
|
|
4
|
+
import { Extension, Node } from '@tiptap/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Core types for the RTE Builder - Editor Agnostic
|
|
8
|
+
* These types define the common interface that all editor adapters must implement
|
|
9
|
+
*/
|
|
10
|
+
/** Supported editor types */
|
|
11
|
+
type EditorType = 'tiptap' | 'slate' | 'lexical' | 'quill' | 'draft';
|
|
12
|
+
/** Editor configuration that applies to all editors */
|
|
13
|
+
interface BaseEditorConfig {
|
|
14
|
+
/** Initial HTML content */
|
|
15
|
+
initialContent?: string;
|
|
16
|
+
/** Placeholder text */
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
/** Whether the editor is editable */
|
|
19
|
+
editable?: boolean;
|
|
20
|
+
/** Auto-focus on mount */
|
|
21
|
+
autoFocus?: boolean;
|
|
22
|
+
/** Custom attributes for the editor element */
|
|
23
|
+
attributes?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
/** Media file for image/video insertion */
|
|
26
|
+
interface MediaFile$1 {
|
|
27
|
+
/** File URL */
|
|
28
|
+
url: string;
|
|
29
|
+
/** File name */
|
|
30
|
+
name?: string;
|
|
31
|
+
/** File type/MIME type */
|
|
32
|
+
type?: string;
|
|
33
|
+
/** Alt text for images */
|
|
34
|
+
alt?: string;
|
|
35
|
+
/** Title attribute */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Width */
|
|
38
|
+
width?: number;
|
|
39
|
+
/** Height */
|
|
40
|
+
height?: number;
|
|
41
|
+
}
|
|
42
|
+
/** All available toolbar button types */
|
|
43
|
+
type ToolbarButtonType = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'codeBlock' | 'subscript' | 'superscript' | 'clearFormatting' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'textColor' | 'backgroundColor' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'bulletList' | 'orderedList' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'blockquote' | 'horizontalRule' | 'link' | 'unlink' | 'image' | 'video' | 'table' | 'emoji' | 'undo' | 'redo' | 'fullscreen' | 'print' | 'separator';
|
|
44
|
+
/** Toolbar preset names */
|
|
45
|
+
type ToolbarPreset = 'full' | 'medium' | 'simple' | 'minimal';
|
|
46
|
+
/** Toolbar configuration */
|
|
47
|
+
interface ToolbarConfig$1 {
|
|
48
|
+
/** Preset to use, or custom buttons array */
|
|
49
|
+
preset?: ToolbarPreset;
|
|
50
|
+
/** Custom buttons array (overrides preset) */
|
|
51
|
+
buttons?: ToolbarButtonType[];
|
|
52
|
+
/** Whether toolbar is sticky */
|
|
53
|
+
sticky?: boolean;
|
|
54
|
+
/** Sticky offset in pixels */
|
|
55
|
+
stickyOffset?: number;
|
|
56
|
+
}
|
|
57
|
+
/** Props for the unified RichTextEditor component */
|
|
58
|
+
interface UnifiedEditorProps {
|
|
59
|
+
/** Which editor to use */
|
|
60
|
+
editor?: EditorType;
|
|
61
|
+
/** Show editor switcher dropdown in toolbar */
|
|
62
|
+
showEditorSwitcher?: boolean;
|
|
63
|
+
/** Callback when editor type changes via switcher */
|
|
64
|
+
onEditorChange?: (editorType: EditorType) => void;
|
|
65
|
+
/** Initial content (HTML string) */
|
|
66
|
+
value?: string;
|
|
67
|
+
/** Callback when content changes */
|
|
68
|
+
onChange?: (content: string) => void;
|
|
69
|
+
/** Callback when editor loses focus */
|
|
70
|
+
onBlur?: () => void;
|
|
71
|
+
/** Callback when editor gains focus */
|
|
72
|
+
onFocus?: () => void;
|
|
73
|
+
/** Placeholder text */
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
/** Editor height in pixels */
|
|
76
|
+
height?: number;
|
|
77
|
+
/** Minimum height in pixels */
|
|
78
|
+
minHeight?: number;
|
|
79
|
+
/** Maximum height in pixels */
|
|
80
|
+
maxHeight?: number;
|
|
81
|
+
/** Whether the editor is disabled */
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
/** Whether the editor is read-only */
|
|
84
|
+
readOnly?: boolean;
|
|
85
|
+
/** Character limit (-1 for no limit) */
|
|
86
|
+
charCounterMax?: number;
|
|
87
|
+
/** Show character counter */
|
|
88
|
+
showCharCounter?: boolean;
|
|
89
|
+
/** Toolbar preset or custom config */
|
|
90
|
+
toolbar?: ToolbarPreset | ToolbarConfig$1;
|
|
91
|
+
/** Custom toolbar buttons (shorthand for toolbar.buttons) */
|
|
92
|
+
toolbarButtons?: ToolbarButtonType[];
|
|
93
|
+
/** Additional className */
|
|
94
|
+
className?: string;
|
|
95
|
+
/** Callback for custom image picker */
|
|
96
|
+
onMediaPickerImage?: () => Promise<MediaFile$1 | null>;
|
|
97
|
+
/** Callback for custom video picker */
|
|
98
|
+
onMediaPickerVideo?: () => Promise<MediaFile$1 | null>;
|
|
99
|
+
/** Enable syntax highlighting for code blocks */
|
|
100
|
+
enableCodeHighlight?: boolean;
|
|
101
|
+
/** Default language for code blocks */
|
|
102
|
+
defaultCodeLanguage?: string;
|
|
103
|
+
/** Additional editor-specific config */
|
|
104
|
+
editorConfig?: Record<string, unknown>;
|
|
105
|
+
}
|
|
106
|
+
/** Methods exposed via ref */
|
|
107
|
+
interface UnifiedEditorRef {
|
|
108
|
+
/** Get the current HTML content */
|
|
109
|
+
getContent: () => string;
|
|
110
|
+
/** Get content as plain text */
|
|
111
|
+
getText: () => string;
|
|
112
|
+
/** Get content as JSON (if supported) */
|
|
113
|
+
getJSON: () => unknown;
|
|
114
|
+
/** Set the HTML content */
|
|
115
|
+
setContent: (content: string) => void;
|
|
116
|
+
/** Focus the editor */
|
|
117
|
+
focus: () => void;
|
|
118
|
+
/** Blur the editor */
|
|
119
|
+
blur: () => void;
|
|
120
|
+
/** Insert HTML at cursor position */
|
|
121
|
+
insertHTML: (html: string) => void;
|
|
122
|
+
/** Insert text at cursor position */
|
|
123
|
+
insertText: (text: string) => void;
|
|
124
|
+
/** Clear all content */
|
|
125
|
+
clear: () => void;
|
|
126
|
+
/** Check if content is empty */
|
|
127
|
+
isEmpty: () => boolean;
|
|
128
|
+
/** Get character count */
|
|
129
|
+
getCharacterCount: () => number;
|
|
130
|
+
/** Get word count */
|
|
131
|
+
getWordCount: () => number;
|
|
132
|
+
/** Check if editor is in fullscreen mode */
|
|
133
|
+
isFullscreen: () => boolean;
|
|
134
|
+
/** Toggle fullscreen mode */
|
|
135
|
+
toggleFullscreen: () => void;
|
|
136
|
+
/** Print the content */
|
|
137
|
+
print: () => void;
|
|
138
|
+
/** Undo last action */
|
|
139
|
+
undo: () => void;
|
|
140
|
+
/** Redo last undone action */
|
|
141
|
+
redo: () => void;
|
|
142
|
+
/** Check if can undo */
|
|
143
|
+
canUndo: () => boolean;
|
|
144
|
+
/** Check if can redo */
|
|
145
|
+
canRedo: () => boolean;
|
|
146
|
+
/** Get the native editor instance */
|
|
147
|
+
getNativeEditor: () => unknown;
|
|
148
|
+
/** Get the editor type */
|
|
149
|
+
getEditorType: () => EditorType;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Abstract interface that all editor adapters must implement.
|
|
153
|
+
* This ensures consistency across different editor implementations.
|
|
154
|
+
*/
|
|
155
|
+
interface EditorAdapter {
|
|
156
|
+
/** The type of editor this adapter handles */
|
|
157
|
+
readonly type: EditorType;
|
|
158
|
+
/** Human-readable name */
|
|
159
|
+
readonly name: string;
|
|
160
|
+
/** Description of the editor */
|
|
161
|
+
readonly description: string;
|
|
162
|
+
/** Whether this adapter is available (dependencies installed) */
|
|
163
|
+
isAvailable: () => boolean;
|
|
164
|
+
/** Get the React component for this editor */
|
|
165
|
+
getComponent: () => React.ComponentType<AdapterComponentProps>;
|
|
166
|
+
/** Get supported features */
|
|
167
|
+
getSupportedFeatures: () => EditorFeatures;
|
|
168
|
+
}
|
|
169
|
+
/** Props passed to adapter components */
|
|
170
|
+
interface AdapterComponentProps {
|
|
171
|
+
value: string;
|
|
172
|
+
onChange: (content: string) => void;
|
|
173
|
+
onBlur?: () => void;
|
|
174
|
+
onFocus?: () => void;
|
|
175
|
+
placeholder?: string;
|
|
176
|
+
height?: number;
|
|
177
|
+
minHeight?: number;
|
|
178
|
+
maxHeight?: number;
|
|
179
|
+
disabled?: boolean;
|
|
180
|
+
readOnly?: boolean;
|
|
181
|
+
charCounterMax?: number;
|
|
182
|
+
showCharCounter?: boolean;
|
|
183
|
+
toolbarButtons: ToolbarButtonType[];
|
|
184
|
+
className?: string;
|
|
185
|
+
onMediaPickerImage?: () => Promise<MediaFile$1 | null>;
|
|
186
|
+
onMediaPickerVideo?: () => Promise<MediaFile$1 | null>;
|
|
187
|
+
enableCodeHighlight?: boolean;
|
|
188
|
+
defaultCodeLanguage?: string;
|
|
189
|
+
editorConfig?: Record<string, unknown>;
|
|
190
|
+
/** Ref forwarding */
|
|
191
|
+
editorRef?: React.Ref<AdapterEditorRef>;
|
|
192
|
+
}
|
|
193
|
+
/** Ref methods that adapters must expose */
|
|
194
|
+
interface AdapterEditorRef {
|
|
195
|
+
getContent: () => string;
|
|
196
|
+
getText: () => string;
|
|
197
|
+
getJSON: () => unknown;
|
|
198
|
+
setContent: (content: string) => void;
|
|
199
|
+
focus: () => void;
|
|
200
|
+
blur: () => void;
|
|
201
|
+
insertHTML: (html: string) => void;
|
|
202
|
+
insertText: (text: string) => void;
|
|
203
|
+
clear: () => void;
|
|
204
|
+
isEmpty: () => boolean;
|
|
205
|
+
getCharacterCount: () => number;
|
|
206
|
+
getWordCount: () => number;
|
|
207
|
+
isFullscreen: () => boolean;
|
|
208
|
+
toggleFullscreen: () => void;
|
|
209
|
+
print: () => void;
|
|
210
|
+
undo: () => void;
|
|
211
|
+
redo: () => void;
|
|
212
|
+
canUndo: () => boolean;
|
|
213
|
+
canRedo: () => boolean;
|
|
214
|
+
getNativeEditor: () => unknown;
|
|
215
|
+
}
|
|
216
|
+
/** Features that an editor may or may not support */
|
|
217
|
+
interface EditorFeatures {
|
|
218
|
+
bold: boolean;
|
|
219
|
+
italic: boolean;
|
|
220
|
+
underline: boolean;
|
|
221
|
+
strikethrough: boolean;
|
|
222
|
+
subscript: boolean;
|
|
223
|
+
superscript: boolean;
|
|
224
|
+
code: boolean;
|
|
225
|
+
codeBlock: boolean;
|
|
226
|
+
codeHighlighting: boolean;
|
|
227
|
+
fontFamily: boolean;
|
|
228
|
+
fontSize: boolean;
|
|
229
|
+
textColor: boolean;
|
|
230
|
+
backgroundColor: boolean;
|
|
231
|
+
lineHeight: boolean;
|
|
232
|
+
textAlign: boolean;
|
|
233
|
+
indent: boolean;
|
|
234
|
+
headings: boolean;
|
|
235
|
+
blockquote: boolean;
|
|
236
|
+
horizontalRule: boolean;
|
|
237
|
+
bulletList: boolean;
|
|
238
|
+
orderedList: boolean;
|
|
239
|
+
nestedLists: boolean;
|
|
240
|
+
links: boolean;
|
|
241
|
+
images: boolean;
|
|
242
|
+
videos: boolean;
|
|
243
|
+
embeds: boolean;
|
|
244
|
+
tables: boolean;
|
|
245
|
+
tableResize: boolean;
|
|
246
|
+
emoji: boolean;
|
|
247
|
+
mentions: boolean;
|
|
248
|
+
hashtags: boolean;
|
|
249
|
+
markdown: boolean;
|
|
250
|
+
fullscreen: boolean;
|
|
251
|
+
print: boolean;
|
|
252
|
+
characterCount: boolean;
|
|
253
|
+
undoRedo: boolean;
|
|
254
|
+
collaboration: boolean;
|
|
255
|
+
comments: boolean;
|
|
256
|
+
}
|
|
257
|
+
/** Default feature set - all false */
|
|
258
|
+
declare const DEFAULT_FEATURES: EditorFeatures;
|
|
259
|
+
|
|
260
|
+
declare const UnifiedEditor: react.ForwardRefExoticComponent<UnifiedEditorProps & react.RefAttributes<UnifiedEditorRef>>;
|
|
261
|
+
|
|
262
|
+
interface EditorProps {
|
|
263
|
+
/** Initial content for the editor (HTML string) */
|
|
264
|
+
value?: string;
|
|
265
|
+
/** Callback when content changes */
|
|
266
|
+
onChange?: (content: string) => void;
|
|
267
|
+
/** Callback when editor is blurred */
|
|
268
|
+
onBlur?: () => void;
|
|
269
|
+
/** Callback when editor is focused */
|
|
270
|
+
onFocus?: () => void;
|
|
271
|
+
/** Placeholder text */
|
|
272
|
+
placeholder?: string;
|
|
273
|
+
/** Editor height in pixels */
|
|
274
|
+
height?: number;
|
|
275
|
+
/** Minimum height in pixels */
|
|
276
|
+
minHeight?: number;
|
|
277
|
+
/** Maximum height in pixels */
|
|
278
|
+
maxHeight?: number;
|
|
279
|
+
/** Whether the editor is disabled */
|
|
280
|
+
disabled?: boolean;
|
|
281
|
+
/** Whether the editor is read-only */
|
|
282
|
+
readOnly?: boolean;
|
|
283
|
+
/** Character limit */
|
|
284
|
+
charCounterMax?: number;
|
|
285
|
+
/** Show character counter */
|
|
286
|
+
showCharCounter?: boolean;
|
|
287
|
+
/** Toolbar preset - 'full' | 'medium' | 'simple' */
|
|
288
|
+
toolbarPreset?: 'full' | 'medium' | 'simple';
|
|
289
|
+
/** Custom toolbar buttons override */
|
|
290
|
+
toolbarButtons?: ToolbarButton[];
|
|
291
|
+
/** Additional className for the container */
|
|
292
|
+
className?: string;
|
|
293
|
+
/** Custom configuration options */
|
|
294
|
+
config?: Record<string, unknown>;
|
|
295
|
+
/** Callback for custom media picker (images) */
|
|
296
|
+
onMediaPickerImage?: () => Promise<MediaFile | null>;
|
|
297
|
+
/** Callback for custom media picker (videos) */
|
|
298
|
+
onMediaPickerVideo?: () => Promise<MediaFile | null>;
|
|
299
|
+
/** Enable syntax highlighting for code blocks */
|
|
300
|
+
enableCodeHighlight?: boolean;
|
|
301
|
+
/** Default language for code blocks */
|
|
302
|
+
defaultCodeLanguage?: string;
|
|
303
|
+
}
|
|
304
|
+
interface EditorRef {
|
|
305
|
+
/** Get the current HTML content */
|
|
306
|
+
getContent: () => string;
|
|
307
|
+
/** Set the HTML content */
|
|
308
|
+
setContent: (html: string) => void;
|
|
309
|
+
/** Focus the editor */
|
|
310
|
+
focus: () => void;
|
|
311
|
+
/** Get the TipTap editor instance */
|
|
312
|
+
getEditor: () => Editor | null;
|
|
313
|
+
/** Insert HTML at cursor */
|
|
314
|
+
insertHTML: (html: string) => void;
|
|
315
|
+
/** Clear all content */
|
|
316
|
+
clear: () => void;
|
|
317
|
+
/** Check if editor is in fullscreen mode */
|
|
318
|
+
isFullscreen: () => boolean;
|
|
319
|
+
/** Toggle fullscreen mode */
|
|
320
|
+
toggleFullscreen: () => void;
|
|
321
|
+
/** Print the content */
|
|
322
|
+
print: () => void;
|
|
323
|
+
}
|
|
324
|
+
interface MediaFile {
|
|
325
|
+
/** File URL */
|
|
326
|
+
url: string;
|
|
327
|
+
/** File name */
|
|
328
|
+
name?: string;
|
|
329
|
+
/** File type/MIME type */
|
|
330
|
+
type?: string;
|
|
331
|
+
/** Alt text for images */
|
|
332
|
+
alt?: string;
|
|
333
|
+
}
|
|
334
|
+
type ToolbarButton = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'codeBlock' | 'subscript' | 'superscript' | 'clearFormatting' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'textColor' | 'backgroundColor' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'bulletList' | 'orderedList' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'blockquote' | 'horizontalRule' | 'link' | 'unlink' | 'image' | 'video' | 'table' | 'emoji' | 'undo' | 'redo' | 'fullscreen' | 'print' | 'separator';
|
|
335
|
+
interface ToolbarConfig {
|
|
336
|
+
full: ToolbarButton[];
|
|
337
|
+
medium: ToolbarButton[];
|
|
338
|
+
simple: ToolbarButton[];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare const RichTextEditor: react.ForwardRefExoticComponent<EditorProps & react.RefAttributes<EditorRef>>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Editor Registry - Manages available editor adapters
|
|
345
|
+
*
|
|
346
|
+
* This module provides a central registry for editor adapters.
|
|
347
|
+
* It allows dynamic registration of editors and automatic selection
|
|
348
|
+
* based on availability.
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Register an editor adapter
|
|
353
|
+
* @param adapter The adapter to register
|
|
354
|
+
*/
|
|
355
|
+
declare function registerAdapter(adapter: EditorAdapter): void;
|
|
356
|
+
/**
|
|
357
|
+
* Unregister an editor adapter
|
|
358
|
+
* @param type The editor type to unregister
|
|
359
|
+
*/
|
|
360
|
+
declare function unregisterAdapter(type: EditorType): void;
|
|
361
|
+
/**
|
|
362
|
+
* Get an adapter by type
|
|
363
|
+
* @param type The editor type
|
|
364
|
+
* @returns The adapter or undefined
|
|
365
|
+
*/
|
|
366
|
+
declare function getAdapter(type: EditorType): EditorAdapter | undefined;
|
|
367
|
+
/**
|
|
368
|
+
* Get all registered adapters
|
|
369
|
+
* @returns Array of all registered adapters
|
|
370
|
+
*/
|
|
371
|
+
declare function getAllAdapters(): EditorAdapter[];
|
|
372
|
+
/**
|
|
373
|
+
* Get all available adapters (ones with dependencies installed)
|
|
374
|
+
* @returns Array of available adapters
|
|
375
|
+
*/
|
|
376
|
+
declare function getAvailableAdapters(): EditorAdapter[];
|
|
377
|
+
/**
|
|
378
|
+
* Check if an editor type is available
|
|
379
|
+
* @param type The editor type to check
|
|
380
|
+
* @returns Whether the editor is available
|
|
381
|
+
*/
|
|
382
|
+
declare function isEditorAvailable(type: EditorType): boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Get the best available editor based on preference order
|
|
385
|
+
* @param preferenceOrder Custom preference order (optional)
|
|
386
|
+
* @returns The best available adapter or undefined
|
|
387
|
+
*/
|
|
388
|
+
declare function getBestAvailableEditor(preferenceOrder?: EditorType[]): EditorAdapter | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Get the default editor (first available in preference order)
|
|
391
|
+
* @returns The default editor type or undefined
|
|
392
|
+
*/
|
|
393
|
+
declare function getDefaultEditorType(): EditorType | undefined;
|
|
394
|
+
/**
|
|
395
|
+
* Get features supported by an editor
|
|
396
|
+
* @param type The editor type
|
|
397
|
+
* @returns The features object or undefined
|
|
398
|
+
*/
|
|
399
|
+
declare function getEditorFeatures(type: EditorType): EditorFeatures | undefined;
|
|
400
|
+
/**
|
|
401
|
+
* Compare features between two editors
|
|
402
|
+
* @param type1 First editor type
|
|
403
|
+
* @param type2 Second editor type
|
|
404
|
+
* @returns Object with features and their support status
|
|
405
|
+
*/
|
|
406
|
+
declare function compareEditorFeatures(type1: EditorType, type2: EditorType): Record<keyof EditorFeatures, {
|
|
407
|
+
[key in EditorType]?: boolean;
|
|
408
|
+
}> | undefined;
|
|
409
|
+
/**
|
|
410
|
+
* Get registry statistics
|
|
411
|
+
* @returns Statistics about registered adapters
|
|
412
|
+
*/
|
|
413
|
+
declare function getRegistryStats(): {
|
|
414
|
+
total: number;
|
|
415
|
+
available: number;
|
|
416
|
+
unavailable: number;
|
|
417
|
+
editors: {
|
|
418
|
+
type: EditorType;
|
|
419
|
+
available: boolean;
|
|
420
|
+
name: string;
|
|
421
|
+
}[];
|
|
422
|
+
};
|
|
423
|
+
declare const EditorRegistry: {
|
|
424
|
+
register: typeof registerAdapter;
|
|
425
|
+
unregister: typeof unregisterAdapter;
|
|
426
|
+
get: typeof getAdapter;
|
|
427
|
+
getAll: typeof getAllAdapters;
|
|
428
|
+
getAvailable: typeof getAvailableAdapters;
|
|
429
|
+
isAvailable: typeof isEditorAvailable;
|
|
430
|
+
getBest: typeof getBestAvailableEditor;
|
|
431
|
+
getDefault: typeof getDefaultEditorType;
|
|
432
|
+
getFeatures: typeof getEditorFeatures;
|
|
433
|
+
compareFeatures: typeof compareEditorFeatures;
|
|
434
|
+
getStats: typeof getRegistryStats;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Toolbar Presets - Predefined toolbar configurations
|
|
439
|
+
*/
|
|
440
|
+
|
|
441
|
+
/** Full toolbar with all features */
|
|
442
|
+
declare const fullToolbar: ToolbarButtonType[];
|
|
443
|
+
/** Medium toolbar for standard editing */
|
|
444
|
+
declare const mediumToolbar: ToolbarButtonType[];
|
|
445
|
+
/** Simple toolbar for basic editing */
|
|
446
|
+
declare const simpleToolbar: ToolbarButtonType[];
|
|
447
|
+
/** Minimal toolbar for comments/notes */
|
|
448
|
+
declare const minimalToolbar: ToolbarButtonType[];
|
|
449
|
+
/** Code-focused toolbar for technical documentation */
|
|
450
|
+
declare const codeToolbar: ToolbarButtonType[];
|
|
451
|
+
/** Blog/Article toolbar */
|
|
452
|
+
declare const blogToolbar: ToolbarButtonType[];
|
|
453
|
+
/** Email composition toolbar */
|
|
454
|
+
declare const emailToolbar: ToolbarButtonType[];
|
|
455
|
+
/** All preset configurations */
|
|
456
|
+
declare const toolbarPresets: {
|
|
457
|
+
readonly full: ToolbarButtonType[];
|
|
458
|
+
readonly medium: ToolbarButtonType[];
|
|
459
|
+
readonly simple: ToolbarButtonType[];
|
|
460
|
+
readonly minimal: ToolbarButtonType[];
|
|
461
|
+
readonly code: ToolbarButtonType[];
|
|
462
|
+
readonly blog: ToolbarButtonType[];
|
|
463
|
+
readonly email: ToolbarButtonType[];
|
|
464
|
+
};
|
|
465
|
+
type ToolbarPresetName = keyof typeof toolbarPresets;
|
|
466
|
+
/**
|
|
467
|
+
* Get a toolbar preset by name
|
|
468
|
+
* @param name The preset name
|
|
469
|
+
* @returns The toolbar buttons array
|
|
470
|
+
*/
|
|
471
|
+
declare function getToolbarPreset(name: ToolbarPresetName): ToolbarButtonType[];
|
|
472
|
+
/**
|
|
473
|
+
* Create a custom toolbar from a preset with modifications
|
|
474
|
+
* @param base Base preset name
|
|
475
|
+
* @param options Modification options
|
|
476
|
+
* @returns Modified toolbar buttons array
|
|
477
|
+
*/
|
|
478
|
+
declare function customizeToolbar(base: ToolbarPresetName, options: {
|
|
479
|
+
add?: ToolbarButtonType[];
|
|
480
|
+
remove?: ToolbarButtonType[];
|
|
481
|
+
insertBefore?: {
|
|
482
|
+
button: ToolbarButtonType;
|
|
483
|
+
items: ToolbarButtonType[];
|
|
484
|
+
};
|
|
485
|
+
insertAfter?: {
|
|
486
|
+
button: ToolbarButtonType;
|
|
487
|
+
items: ToolbarButtonType[];
|
|
488
|
+
};
|
|
489
|
+
}): ToolbarButtonType[];
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* TipTap Editor Adapter
|
|
493
|
+
*
|
|
494
|
+
* This adapter wraps the TipTap editor to conform to the unified editor interface.
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* TipTap Editor Adapter
|
|
499
|
+
*/
|
|
500
|
+
declare const TipTapAdapter: EditorAdapter;
|
|
501
|
+
|
|
502
|
+
interface TipTapEditorComponentProps extends AdapterComponentProps {
|
|
503
|
+
}
|
|
504
|
+
declare const TipTapEditorComponent: react.ForwardRefExoticComponent<TipTapEditorComponentProps & react.RefAttributes<AdapterEditorRef>>;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* TipTap Toolbar Component
|
|
508
|
+
*
|
|
509
|
+
* Toolbar implementation specific to TipTap editor.
|
|
510
|
+
*/
|
|
511
|
+
|
|
512
|
+
interface TipTapToolbarProps {
|
|
513
|
+
editor: Editor | null;
|
|
514
|
+
buttons: ToolbarButtonType[];
|
|
515
|
+
onMediaPickerImage?: () => void;
|
|
516
|
+
onMediaPickerVideo?: () => void;
|
|
517
|
+
}
|
|
518
|
+
declare const TipTapToolbar: react__default.FC<TipTapToolbarProps>;
|
|
519
|
+
|
|
520
|
+
type FontSizeOptions = {
|
|
521
|
+
types: string[];
|
|
522
|
+
};
|
|
523
|
+
declare module '@tiptap/core' {
|
|
524
|
+
interface Commands<ReturnType> {
|
|
525
|
+
fontSize: {
|
|
526
|
+
/**
|
|
527
|
+
* Set the font size
|
|
528
|
+
*/
|
|
529
|
+
setFontSize: (size: string) => ReturnType;
|
|
530
|
+
/**
|
|
531
|
+
* Unset the font size
|
|
532
|
+
*/
|
|
533
|
+
unsetFontSize: () => ReturnType;
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
declare const FontSize: Extension<FontSizeOptions, any>;
|
|
538
|
+
|
|
539
|
+
type LineHeightOptions = {
|
|
540
|
+
types: string[];
|
|
541
|
+
defaultLineHeight: string;
|
|
542
|
+
};
|
|
543
|
+
declare module '@tiptap/core' {
|
|
544
|
+
interface Commands<ReturnType> {
|
|
545
|
+
lineHeight: {
|
|
546
|
+
/**
|
|
547
|
+
* Set the line height
|
|
548
|
+
*/
|
|
549
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
550
|
+
/**
|
|
551
|
+
* Unset the line height
|
|
552
|
+
*/
|
|
553
|
+
unsetLineHeight: () => ReturnType;
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
558
|
+
|
|
559
|
+
interface VideoOptions {
|
|
560
|
+
inline: boolean;
|
|
561
|
+
allowBase64: boolean;
|
|
562
|
+
HTMLAttributes: Record<string, unknown>;
|
|
563
|
+
}
|
|
564
|
+
declare module '@tiptap/core' {
|
|
565
|
+
interface Commands<ReturnType> {
|
|
566
|
+
video: {
|
|
567
|
+
/**
|
|
568
|
+
* Insert a video
|
|
569
|
+
*/
|
|
570
|
+
setVideo: (options: {
|
|
571
|
+
src: string;
|
|
572
|
+
alt?: string;
|
|
573
|
+
title?: string;
|
|
574
|
+
}) => ReturnType;
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
declare const Video: Node<VideoOptions, any>;
|
|
579
|
+
|
|
580
|
+
interface EmojiOptions {
|
|
581
|
+
enableEmoticons: boolean;
|
|
582
|
+
}
|
|
583
|
+
declare module '@tiptap/core' {
|
|
584
|
+
interface Commands<ReturnType> {
|
|
585
|
+
emoji: {
|
|
586
|
+
/**
|
|
587
|
+
* Insert an emoji at the current position
|
|
588
|
+
*/
|
|
589
|
+
insertEmoji: (emoji: string) => ReturnType;
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
declare const EMOJI_CATEGORIES: {
|
|
594
|
+
readonly smileys: {
|
|
595
|
+
readonly label: "Smileys & People";
|
|
596
|
+
readonly emojis: readonly ["๐", "๐", "๐", "๐", "๐", "๐
", "๐คฃ", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅฐ", "๐", "๐คฉ", "๐", "๐", "๐", "๐", "๐ฅฒ", "๐", "๐", "๐", "๐คช", "๐", "๐ค", "๐ค", "๐คญ", "๐คซ", "๐ค", "๐ค", "๐คจ", "๐", "๐", "๐ถ", "๐", "๐", "๐", "๐ฌ", "๐ฎโ๐จ", "๐คฅ", "๐", "๐", "๐ช", "๐คค", "๐ด", "๐ท", "๐ค", "๐ค", "๐คข", "๐คฎ", "๐คง", "๐ฅต", "๐ฅถ", "๐ฅด", "๐ต", "๐คฏ", "๐ค ", "๐ฅณ", "๐ฅธ", "๐", "๐ค", "๐ง", "๐", "๐", "๐", "โน๏ธ", "๐ฎ", "๐ฏ", "๐ฒ", "๐ณ", "๐ฅบ", "๐ฆ", "๐ง", "๐จ", "๐ฐ", "๐ฅ", "๐ข", "๐ญ", "๐ฑ", "๐", "๐ฃ", "๐", "๐", "๐ฉ", "๐ซ", "๐ฅฑ", "๐ค", "๐ก", "๐ ", "๐คฌ", "๐", "๐ฟ", "๐", "โ ๏ธ", "๐ฉ", "๐คก", "๐น", "๐บ"];
|
|
597
|
+
};
|
|
598
|
+
readonly gestures: {
|
|
599
|
+
readonly label: "Gestures & Body";
|
|
600
|
+
readonly emojis: readonly ["๐", "๐ค", "๐๏ธ", "โ", "๐", "๐", "๐ค", "๐ค", "โ๏ธ", "๐ค", "๐ค", "๐ค", "๐ค", "๐", "๐", "๐", "๐", "๐", "โ๏ธ", "๐", "๐", "โ", "๐", "๐ค", "๐ค", "๐", "๐", "๐", "๐คฒ", "๐ค", "๐", "โ๏ธ", "๐
", "๐คณ", "๐ช", "๐ฆพ", "๐ฆฟ", "๐ฆต", "๐ฆถ", "๐", "๐ฆป", "๐", "๐ง ", "๐ซ", "๐ซ", "๐ฆท", "๐ฆด", "๐", "๐๏ธ", "๐
", "๐", "๐", "๐ฉธ"];
|
|
601
|
+
};
|
|
602
|
+
readonly animals: {
|
|
603
|
+
readonly label: "Animals & Nature";
|
|
604
|
+
readonly emojis: readonly ["๐ถ", "๐ฑ", "๐ญ", "๐น", "๐ฐ", "๐ฆ", "๐ป", "๐ผ", "๐ปโโ๏ธ", "๐จ", "๐ฏ", "๐ฆ", "๐ฎ", "๐ท", "๐ธ", "๐ต", "๐", "๐", "๐", "๐", "๐", "๐ง", "๐ฆ", "๐ค", "๐ฃ", "๐ฅ", "๐ฆ", "๐ฆ
", "๐ฆ", "๐ฆ", "๐บ", "๐", "๐ด", "๐ฆ", "๐", "๐", "๐ฆ", "๐", "๐", "๐", "๐ฆ", "๐ฆ", "๐ฆ", "๐ข", "๐", "๐ฆ", "๐ฆ", "๐ฆ", "๐", "๐ฆ", "๐ฆ", "๐ฆ", "๐ฆ", "๐ก", "๐ ", "๐", "๐ฌ", "๐ณ", "๐", "๐ฆ", "๐", "๐
", "๐", "๐ฆ", "๐ฆ", "๐ฆง", "๐ฆฃ", "๐", "๐ฆ", "๐ฆ", "๐ธ", "๐บ", "๐ป", "๐ผ", "๐ท", "๐น", "๐ฅ", "๐ต", "๐ฒ", "๐ณ", "๐ด", "๐ฑ", "๐ฟ", "โ๏ธ", "๐", "๐", "๐", "๐", "๐", "๐พ"];
|
|
605
|
+
};
|
|
606
|
+
readonly food: {
|
|
607
|
+
readonly label: "Food & Drink";
|
|
608
|
+
readonly emojis: readonly ["๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ซ", "๐", "๐", "๐", "๐ฅญ", "๐", "๐ฅฅ", "๐ฅ", "๐
", "๐", "๐ฅ", "๐ฅฆ", "๐ฅฌ", "๐ฅ", "๐ถ๏ธ", "๐ซ", "๐ฝ", "๐ฅ", "๐ซ", "๐ง", "๐ง
", "๐ฅ", "๐ ", "๐ฅ", "๐ฅฏ", "๐", "๐ฅ", "๐ฅจ", "๐ง", "๐ฅ", "๐ณ", "๐ง", "๐ฅ", "๐ง", "๐ฅ", "๐ฅฉ", "๐", "๐", "๐ฆด", "๐ญ", "๐", "๐", "๐", "๐ซ", "๐ฅช", "๐ฅ", "๐ง", "๐ฎ", "๐ฏ", "๐ซ", "๐ฅ", "๐ฅ", "๐ซ", "๐", "๐", "๐ฒ", "๐", "๐ฃ", "๐ฑ", "๐ฅ", "๐ฆช", "๐ค", "๐", "๐", "๐", "๐ฅ", "๐ฅ ", "๐ฅฎ", "๐ข", "๐ก", "๐ง", "๐จ", "๐ฆ", "๐ฅง", "๐ง", "๐ฐ", "๐", "๐ฎ", "๐ญ", "๐ฌ", "๐ซ", "๐ฟ", "๐ฉ", "๐ช", "๐ฐ", "๐ฅ", "๐ฏ", "โ", "๐ต", "๐ง", "๐ฅค", "๐ถ", "๐บ", "๐ป", "๐ฅ", "๐ท", "๐ฅ", "๐ธ", "๐น", "๐ง", "๐ง"];
|
|
609
|
+
};
|
|
610
|
+
readonly activities: {
|
|
611
|
+
readonly label: "Activities";
|
|
612
|
+
readonly emojis: readonly ["โฝ", "๐", "๐", "โพ", "๐ฅ", "๐พ", "๐", "๐", "๐ฅ", "๐ฑ", "๐ช", "๐", "๐ธ", "๐", "๐", "๐ฅ", "๐", "๐ช", "๐ฅ
", "โณ", "๐ช", "๐น", "๐ฃ", "๐คฟ", "๐ฅ", "๐ฅ", "๐ฝ", "๐น", "๐ผ", "๐ท", "โธ๏ธ", "๐ฅ", "๐ฟ", "โท๏ธ", "๐", "๐ช", "๐๏ธ", "๐คผ", "๐คธ", "โน๏ธ", "๐คบ", "๐คพ", "๐๏ธ", "๐", "๐ง", "๐", "๐", "๐คฝ", "๐ฃ", "๐ง", "๐ต", "๐ด", "๐", "๐ฅ", "๐ฅ", "๐ฅ", "๐
", "๐๏ธ", "๐ต๏ธ", "๐๏ธ", "๐ซ", "๐๏ธ", "๐ช", "๐ญ", "๐จ", "๐ฌ", "๐ค", "๐ง", "๐ผ", "๐น", "๐ฅ", "๐ช", "๐ท", "๐บ", "๐ช", "๐ธ", "๐ช", "๐ป", "๐ฒ", "โ๏ธ", "๐ฏ", "๐ณ", "๐ฎ", "๐ฐ", "๐งฉ"];
|
|
613
|
+
};
|
|
614
|
+
readonly objects: {
|
|
615
|
+
readonly label: "Objects";
|
|
616
|
+
readonly emojis: readonly ["โ", "๐ฑ", "๐ป", "โจ๏ธ", "๐ฅ๏ธ", "๐จ๏ธ", "๐ฑ๏ธ", "๐ฒ๏ธ", "๐น๏ธ", "๐๏ธ", "๐ฝ", "๐พ", "๐ฟ", "๐", "๐ผ", "๐ท", "๐ธ", "๐น", "๐ฅ", "๐ฝ๏ธ", "๐๏ธ", "๐", "โ๏ธ", "๐", "๐ ", "๐บ", "๐ป", "๐๏ธ", "๐๏ธ", "๐๏ธ", "๐งญ", "โฑ๏ธ", "โฒ๏ธ", "โฐ", "๐ฐ๏ธ", "โ", "โณ", "๐ก", "๐", "๐", "๐ก", "๐ฆ", "๐ฏ๏ธ", "๐ช", "๐งฏ", "๐ข๏ธ", "๐ธ", "๐ต", "๐ด", "๐ถ", "๐ท", "๐ช", "๐ฐ", "๐ณ", "๐งพ", "๐", "โ๏ธ", "๐ช", "๐งฐ", "๐ช", "๐ง", "๐จ", "โ๏ธ", "๐ ๏ธ", "โ๏ธ", "๐ช", "๐ฉ", "โ๏ธ", "๐ชค", "๐งฑ", "โ๏ธ", "๐งฒ", "๐ซ", "๐ฃ", "๐งจ", "๐ช", "๐ช", "๐ก๏ธ", "โ๏ธ", "๐ก๏ธ", "๐ฌ", "โฐ๏ธ", "๐ชฆ", "โฑ๏ธ", "๐บ", "๐ฎ", "๐ฟ", "๐งฟ", "๐", "โ๏ธ", "๐ญ", "๐ฌ", "๐ณ๏ธ", "๐ฉน", "๐ฉบ", "๐", "๐", "๐ฉธ", "๐งฌ", "๐ฆ ", "๐งซ", "๐งช", "๐ก๏ธ", "๐งน", "๐ช ", "๐งบ", "๐งป", "๐ฝ", "๐ฐ", "๐ฟ", "๐", "๐", "๐งผ", "๐ชฅ", "๐ช", "๐งฝ", "๐ชฃ", "๐งด", "๐๏ธ", "๐", "๐๏ธ", "๐ช", "๐ช", "๐๏ธ", "๐๏ธ", "๐", "๐งธ", "๐ช", "๐ผ๏ธ", "๐ช", "๐ช", "๐๏ธ", "๐", "๐", "๐", "๐", "๐", "๐ช", "๐ช
", "๐", "๐", "๐", "๐ฎ", "๐", "๐งง", "โ๏ธ", "๐ฉ", "๐จ", "๐ง", "๐", "๐ฅ", "๐ค", "๐ฆ", "๐ท๏ธ", "๐ช", "๐ซ", "๐ฌ", "๐ญ", "๐ฎ", "๐ฏ", "๐", "๐", "๐", "๐", "๐งพ", "๐", "๐", "๐", "๐๏ธ", "๐๏ธ", "๐", "๐
", "๐๏ธ", "๐", "๐๏ธ", "๐ณ๏ธ", "๐๏ธ", "๐", "๐", "๐", "๐๏ธ", "๐๏ธ", "๐ฐ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐งท", "๐", "๐", "๐๏ธ", "๐", "๐", "๐งฎ", "๐", "๐", "โ๏ธ", "๐๏ธ", "๐๏ธ", "โ๏ธ", "๐๏ธ", "๐๏ธ", "๐", "โ๏ธ", "๐", "๐", "๐", "๐", "๐", "๐"];
|
|
617
|
+
};
|
|
618
|
+
readonly symbols: {
|
|
619
|
+
readonly label: "Symbols";
|
|
620
|
+
readonly emojis: readonly ["โค๏ธ", "๐งก", "๐", "๐", "๐", "๐", "๐ค", "๐ค", "๐ค", "๐", "โฃ๏ธ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "โฎ๏ธ", "โ๏ธ", "โช๏ธ", "๐๏ธ", "โธ๏ธ", "โก๏ธ", "๐ฏ", "๐", "โฏ๏ธ", "โฆ๏ธ", "๐", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "โ", "๐", "โ๏ธ", "๐", "โข๏ธ", "โฃ๏ธ", "๐ด", "๐ณ", "๐ถ", "๐", "๐ธ", "๐บ", "๐ท๏ธ", "โด๏ธ", "๐", "๐ฎ", "๐", "ใ๏ธ", "ใ๏ธ", "๐ด", "๐ต", "๐น", "๐ฒ", "๐
ฐ๏ธ", "๐
ฑ๏ธ", "๐", "๐", "๐
พ๏ธ", "๐", "โ", "โญ", "๐", "โ", "๐", "๐ซ", "๐ฏ", "๐ข", "โจ๏ธ", "๐ท", "๐ฏ", "๐ณ", "๐ฑ", "๐", "๐ต", "๐ญ", "โ", "โ", "โ", "โ", "โผ๏ธ", "โ๏ธ", "๐
", "๐", "ใฝ๏ธ", "โ ๏ธ", "๐ธ", "๐ฑ", "โ๏ธ", "๐ฐ", "โป๏ธ", "โ
", "๐ฏ", "๐น", "โ๏ธ", "โณ๏ธ", "โ", "๐", "๐ ", "โ๏ธ", "๐", "๐ค", "๐ง", "๐พ", "โฟ", "๐
ฟ๏ธ", "๐", "๐ณ", "๐๏ธ", "๐", "๐", "๐", "๐
", "๐น", "๐บ", "๐ผ", "โง๏ธ", "๐ป", "๐ฎ", "๐ฆ", "๐ถ", "๐", "๐ฃ", "โน๏ธ", "๐ค", "๐ก", "๐ ", "๐", "๐", "๐", "๐", "๐", "๐", "0๏ธโฃ", "1๏ธโฃ", "2๏ธโฃ", "3๏ธโฃ", "4๏ธโฃ", "5๏ธโฃ", "6๏ธโฃ", "7๏ธโฃ", "8๏ธโฃ", "9๏ธโฃ", "๐", "๐ข", "#๏ธโฃ", "*๏ธโฃ", "โ๏ธ", "โถ๏ธ", "โธ๏ธ", "โฏ๏ธ", "โน๏ธ", "โบ๏ธ", "โญ๏ธ", "โฎ๏ธ", "โฉ", "โช", "โซ", "โฌ", "โ๏ธ", "๐ผ", "๐ฝ", "โก๏ธ", "โฌ
๏ธ", "โฌ๏ธ", "โฌ๏ธ", "โ๏ธ", "โ๏ธ", "โ๏ธ", "โ๏ธ", "โ๏ธ", "โ๏ธ", "โช๏ธ", "โฉ๏ธ", "โคด๏ธ", "โคต๏ธ", "๐", "๐", "๐", "๐", "๐", "๐ต", "๐ถ", "โ", "โ", "โ", "โ๏ธ", "โพ๏ธ", "๐ฒ", "๐ฑ", "โข๏ธ", "ยฉ๏ธ", "ยฎ๏ธ", "ใฐ๏ธ", "โฐ", "โฟ", "๐", "๐", "๐", "๐", "๐", "โ๏ธ", "โ๏ธ", "๐", "๐ด", "๐ ", "๐ก", "๐ข", "๐ต", "๐ฃ", "โซ", "โช", "๐ค", "๐บ", "๐ป", "๐ธ", "๐น", "๐ถ", "๐ท", "๐ณ", "๐ฒ", "โช๏ธ", "โซ๏ธ", "โพ", "โฝ", "โผ๏ธ", "โป๏ธ", "๐ฅ", "๐ง", "๐จ", "๐ฉ", "๐ฆ", "๐ช", "โฌ", "โฌ", "๐ซ", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฃ", "๐ข", "๐ฌ", "๐ญ", "๐ฏ๏ธ", "โ ๏ธ", "โฃ๏ธ", "โฅ๏ธ", "โฆ๏ธ", "๐", "๐ด", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ ", "๐ก", "๐ข", "๐ฃ", "๐ค", "๐ฅ", "๐ฆ", "๐ง"];
|
|
621
|
+
};
|
|
622
|
+
readonly flags: {
|
|
623
|
+
readonly label: "Flags";
|
|
624
|
+
readonly emojis: readonly ["๐ณ๏ธ", "๐ด", "๐ดโโ ๏ธ", "๐", "๐ฉ", "๐", "๐ณ๏ธโ๐", "๐ณ๏ธโโง๏ธ", "๐บ๐ธ", "๐ฌ๐ง", "๐จ๐ฆ", "๐ฆ๐บ", "๐ฎ๐ณ", "๐ฏ๐ต", "๐จ๐ณ", "๐ฐ๐ท", "๐ฉ๐ช", "๐ซ๐ท", "๐ฎ๐น", "๐ช๐ธ", "๐ง๐ท", "๐ฒ๐ฝ", "๐ท๐บ", "๐ฟ๐ฆ"];
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
declare const Emoji: Extension<EmojiOptions, any>;
|
|
628
|
+
|
|
629
|
+
interface FullscreenOptions {
|
|
630
|
+
className: string;
|
|
631
|
+
}
|
|
632
|
+
declare module '@tiptap/core' {
|
|
633
|
+
interface Commands<ReturnType> {
|
|
634
|
+
fullscreen: {
|
|
635
|
+
/**
|
|
636
|
+
* Toggle fullscreen mode
|
|
637
|
+
*/
|
|
638
|
+
toggleFullscreen: () => ReturnType;
|
|
639
|
+
/**
|
|
640
|
+
* Enter fullscreen mode
|
|
641
|
+
*/
|
|
642
|
+
enterFullscreen: () => ReturnType;
|
|
643
|
+
/**
|
|
644
|
+
* Exit fullscreen mode
|
|
645
|
+
*/
|
|
646
|
+
exitFullscreen: () => ReturnType;
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
declare const Fullscreen: Extension<FullscreenOptions, any>;
|
|
651
|
+
|
|
652
|
+
interface PrintOptions {
|
|
653
|
+
title?: string;
|
|
654
|
+
styles?: string;
|
|
655
|
+
}
|
|
656
|
+
declare module '@tiptap/core' {
|
|
657
|
+
interface Commands<ReturnType> {
|
|
658
|
+
print: {
|
|
659
|
+
/**
|
|
660
|
+
* Print the editor content
|
|
661
|
+
*/
|
|
662
|
+
print: () => ReturnType;
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
declare const Print: Extension<PrintOptions, any>;
|
|
667
|
+
|
|
668
|
+
interface IndentOptions {
|
|
669
|
+
types: string[];
|
|
670
|
+
minIndent: number;
|
|
671
|
+
maxIndent: number;
|
|
672
|
+
indentUnit: string;
|
|
673
|
+
}
|
|
674
|
+
declare module '@tiptap/core' {
|
|
675
|
+
interface Commands<ReturnType> {
|
|
676
|
+
indent: {
|
|
677
|
+
/**
|
|
678
|
+
* Indent the current block
|
|
679
|
+
*/
|
|
680
|
+
indent: () => ReturnType;
|
|
681
|
+
/**
|
|
682
|
+
* Outdent the current block
|
|
683
|
+
*/
|
|
684
|
+
outdent: () => ReturnType;
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
declare const Indent: Extension<IndentOptions, any>;
|
|
689
|
+
|
|
690
|
+
export { type AdapterComponentProps, type AdapterEditorRef, type BaseEditorConfig, DEFAULT_FEATURES, EMOJI_CATEGORIES, type EditorAdapter, type EditorFeatures, type EditorProps, type EditorRef, EditorRegistry, type EditorType, Emoji, FontSize, Fullscreen, Indent, type MediaFile as LegacyMediaFile, type ToolbarConfig as LegacyToolbarConfig, LineHeight, type MediaFile$1 as MediaFile, Print, RichTextEditor, TipTapAdapter, TipTapEditorComponent, TipTapToolbar, type ToolbarButton, type ToolbarButtonType, type ToolbarConfig$1 as ToolbarConfig, type ToolbarPreset, type ToolbarPresetName, UnifiedEditor, type UnifiedEditorProps, type UnifiedEditorRef, Video, blogToolbar, codeToolbar, compareEditorFeatures, customizeToolbar, emailToolbar, fullToolbar, getAdapter, getAllAdapters, getAvailableAdapters, getBestAvailableEditor, getDefaultEditorType, getEditorFeatures, getRegistryStats, getToolbarPreset, isEditorAvailable, mediumToolbar, minimalToolbar, registerAdapter, simpleToolbar, toolbarPresets, unregisterAdapter };
|