@blocknote/core 0.12.4 → 0.13.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/README.md +6 -2
- package/dist/blocknote.js +2362 -1544
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +24 -8
- package/src/editor/BlockNoteExtensions.ts +23 -12
- package/src/editor/BlockNoteTipTapEditor.ts +9 -6
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +24 -41
- package/src/extensions/ImagePanel/ImageToolbarPlugin.ts +27 -30
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +25 -3
- package/src/extensions/NonEditableBlocks/NonEditableBlockPlugin.ts +43 -12
- package/src/extensions/Placeholder/PlaceholderPlugin.ts +95 -0
- package/src/extensions/SideMenu/SideMenuPlugin.ts +3 -2
- package/src/extensions/SuggestionMenu/DefaultSuggestionItem.ts +3 -0
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +6 -2
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +18 -44
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +1 -1
- package/src/i18n/dictionary.ts +17 -0
- package/src/i18n/locales/en.ts +196 -0
- package/src/i18n/locales/fr.ts +196 -0
- package/src/i18n/locales/index.ts +4 -0
- package/src/i18n/locales/nl.ts +197 -0
- package/src/i18n/locales/zh.ts +213 -0
- package/src/index.ts +4 -1
- package/src/pm-nodes/BlockContainer.ts +20 -2
- package/src/util/browser.ts +2 -2
- package/src/util/typescript.ts +8 -0
- package/types/src/editor/BlockNoteEditor.d.ts +11 -1
- package/types/src/editor/BlockNoteExtensions.d.ts +3 -3
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +5 -4
- package/types/src/extensions/ImagePanel/ImageToolbarPlugin.d.ts +7 -5
- package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +3 -1
- package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +3 -0
- package/types/src/extensions/SuggestionMenu/DefaultSuggestionItem.d.ts +2 -0
- package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +2 -1
- package/types/src/i18n/dictionary.d.ts +2 -0
- package/types/src/i18n/locales/en.d.ts +184 -0
- package/types/src/i18n/locales/fr.d.ts +184 -0
- package/types/src/i18n/locales/index.d.ts +4 -0
- package/types/src/i18n/locales/nl.d.ts +2 -0
- package/types/src/i18n/locales/zh.d.ts +2 -0
- package/types/src/index.d.ts +4 -1
- package/types/src/pm-nodes/BlockContainer.d.ts +1 -1
- package/types/src/util/browser.d.ts +1 -1
- package/types/src/util/typescript.d.ts +1 -0
- package/src/extensions/Placeholder/PlaceholderExtension.ts +0 -124
- package/types/src/extensions/Placeholder/PlaceholderExtension.d.ts +0 -12
|
@@ -3,10 +3,10 @@ import { Node } from "prosemirror-model";
|
|
|
3
3
|
import * as Y from "yjs";
|
|
4
4
|
import { Block, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from "../blocks/defaultBlocks";
|
|
5
5
|
import { FormattingToolbarProsemirrorPlugin } from "../extensions/FormattingToolbar/FormattingToolbarPlugin";
|
|
6
|
+
import { ImagePanelProsemirrorPlugin } from "../extensions/ImagePanel/ImageToolbarPlugin";
|
|
6
7
|
import { LinkToolbarProsemirrorPlugin } from "../extensions/LinkToolbar/LinkToolbarPlugin";
|
|
7
8
|
import { SideMenuProsemirrorPlugin } from "../extensions/SideMenu/SideMenuPlugin";
|
|
8
9
|
import { SuggestionMenuProseMirrorPlugin } from "../extensions/SuggestionMenu/SuggestionPlugin";
|
|
9
|
-
import { ImagePanelProsemirrorPlugin } from "../extensions/ImagePanel/ImageToolbarPlugin";
|
|
10
10
|
import { TableHandlesProsemirrorPlugin } from "../extensions/TableHandles/TableHandlesPlugin";
|
|
11
11
|
import { BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSpecs, InlineContentSchema, InlineContentSpecs, PartialInlineContent, StyleSchema, StyleSpecs, Styles } from "../schema";
|
|
12
12
|
import { NoInfer } from "../util/typescript";
|
|
@@ -14,10 +14,18 @@ import { TextCursorPosition } from "./cursorPositionTypes";
|
|
|
14
14
|
import { Selection } from "./selectionTypes";
|
|
15
15
|
import { BlockNoteSchema } from "./BlockNoteSchema";
|
|
16
16
|
import { BlockNoteTipTapEditor } from "./BlockNoteTipTapEditor";
|
|
17
|
+
import { Dictionary } from "../i18n/dictionary";
|
|
17
18
|
import "./Block.css";
|
|
18
19
|
import "./editor.css";
|
|
19
20
|
export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends InlineContentSchema, SSchema extends StyleSchema> = {
|
|
20
21
|
enableBlockNoteExtensions: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A dictionary object containing translations for the editor.
|
|
24
|
+
*/
|
|
25
|
+
dictionary?: Dictionary;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated, provide placeholders via dictionary instead
|
|
28
|
+
*/
|
|
21
29
|
placeholders: Record<string | "default", string>;
|
|
22
30
|
/**
|
|
23
31
|
* An object containing attributes that should be added to HTML elements of the editor.
|
|
@@ -67,6 +75,7 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
|
|
|
67
75
|
renderCursor?: (user: any) => HTMLElement;
|
|
68
76
|
};
|
|
69
77
|
_tiptapOptions: Partial<EditorOptions>;
|
|
78
|
+
trailingBlock?: boolean;
|
|
70
79
|
};
|
|
71
80
|
export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockSchema, ISchema extends InlineContentSchema = DefaultInlineContentSchema, SSchema extends StyleSchema = DefaultStyleSchema> {
|
|
72
81
|
private readonly options;
|
|
@@ -74,6 +83,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
74
83
|
contentComponent: any;
|
|
75
84
|
};
|
|
76
85
|
blockCache: WeakMap<Node, Block<any, any, any>>;
|
|
86
|
+
readonly dictionary: Dictionary;
|
|
77
87
|
readonly schema: BlockNoteSchema<BSchema, ISchema, SSchema>;
|
|
78
88
|
readonly blockImplementations: BlockSpecs;
|
|
79
89
|
readonly inlineContentImplementations: InlineContentSpecs;
|
|
@@ -7,12 +7,12 @@ import { BlockNoteDOMAttributes, BlockSpecs, InlineContentSchema, InlineContentS
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const getBlockNoteExtensions: <BSchema extends Record<string, import("../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(opts: {
|
|
9
9
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
10
|
-
placeholders?: Record<string, string> | undefined;
|
|
11
10
|
domAttributes: Partial<BlockNoteDOMAttributes>;
|
|
12
11
|
blockSchema: BSchema;
|
|
13
12
|
blockSpecs: BlockSpecs;
|
|
14
13
|
inlineContentSpecs: InlineContentSpecs;
|
|
15
14
|
styleSpecs: StyleSpecs;
|
|
15
|
+
trailingBlock: boolean | undefined;
|
|
16
16
|
collaboration?: {
|
|
17
17
|
fragment: Y.XmlFragment;
|
|
18
18
|
user: {
|
|
@@ -20,6 +20,6 @@ export declare const getBlockNoteExtensions: <BSchema extends Record<string, imp
|
|
|
20
20
|
color: string;
|
|
21
21
|
};
|
|
22
22
|
provider: any;
|
|
23
|
-
renderCursor?: (
|
|
24
|
-
}
|
|
23
|
+
renderCursor?: (user: any) => HTMLElement;
|
|
24
|
+
};
|
|
25
25
|
}) => Extensions;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state";
|
|
2
2
|
import { EditorView } from "prosemirror-view";
|
|
3
3
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
4
4
|
import { UiElementPosition } from "../../extensions-shared/UiElementPosition";
|
|
5
5
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
6
6
|
import { EventEmitter } from "../../util/EventEmitter";
|
|
7
7
|
export type FormattingToolbarState = UiElementPosition;
|
|
8
|
-
export declare class FormattingToolbarView {
|
|
8
|
+
export declare class FormattingToolbarView implements PluginView {
|
|
9
9
|
private readonly editor;
|
|
10
10
|
private readonly pmView;
|
|
11
11
|
state?: FormattingToolbarState;
|
|
@@ -23,11 +23,10 @@ export declare class FormattingToolbarView {
|
|
|
23
23
|
viewMousedownHandler: () => void;
|
|
24
24
|
viewMouseupHandler: () => void;
|
|
25
25
|
dragHandler: () => void;
|
|
26
|
-
focusHandler: () => void;
|
|
27
|
-
blurHandler: (event: FocusEvent) => void;
|
|
28
26
|
scrollHandler: () => void;
|
|
29
27
|
update(view: EditorView, oldState?: EditorState): void;
|
|
30
28
|
destroy(): void;
|
|
29
|
+
closeMenu: () => void;
|
|
31
30
|
getSelectionBoundingBox(): DOMRect;
|
|
32
31
|
}
|
|
33
32
|
export declare const formattingToolbarPluginKey: PluginKey<any>;
|
|
@@ -35,5 +34,7 @@ export declare class FormattingToolbarProsemirrorPlugin extends EventEmitter<any
|
|
|
35
34
|
private view;
|
|
36
35
|
readonly plugin: Plugin;
|
|
37
36
|
constructor(editor: BlockNoteEditor<any, any, any>);
|
|
37
|
+
get shown(): boolean;
|
|
38
38
|
onUpdate(callback: (state: FormattingToolbarState) => void): () => void;
|
|
39
|
+
closeMenu: () => void;
|
|
39
40
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EditorState, Plugin, PluginKey } from "prosemirror-state";
|
|
1
|
+
import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state";
|
|
2
2
|
import { EditorView } from "prosemirror-view";
|
|
3
|
+
import { DefaultBlockSchema } from "../../blocks/defaultBlocks";
|
|
3
4
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
4
|
-
import type { BlockFromConfig, InlineContentSchema, StyleSchema } from "../../schema";
|
|
5
5
|
import { UiElementPosition } from "../../extensions-shared/UiElementPosition";
|
|
6
|
+
import type { BlockFromConfig, InlineContentSchema, StyleSchema } from "../../schema";
|
|
6
7
|
import { EventEmitter } from "../../util/EventEmitter";
|
|
7
|
-
import { DefaultBlockSchema } from "../../blocks/defaultBlocks";
|
|
8
8
|
export type ImagePanelState<I extends InlineContentSchema, S extends StyleSchema> = UiElementPosition & {
|
|
9
9
|
block: BlockFromConfig<DefaultBlockSchema["image"], I, S>;
|
|
10
10
|
};
|
|
11
|
-
export declare class ImagePanelView<I extends InlineContentSchema, S extends StyleSchema> {
|
|
11
|
+
export declare class ImagePanelView<I extends InlineContentSchema, S extends StyleSchema> implements PluginView {
|
|
12
12
|
private readonly pluginKey;
|
|
13
13
|
private readonly pmView;
|
|
14
14
|
state?: ImagePanelState<I, S>;
|
|
@@ -17,9 +17,9 @@ export declare class ImagePanelView<I extends InlineContentSchema, S extends Sty
|
|
|
17
17
|
constructor(pluginKey: PluginKey, pmView: EditorView, emitUpdate: (state: ImagePanelState<I, S>) => void);
|
|
18
18
|
mouseDownHandler: () => void;
|
|
19
19
|
dragstartHandler: () => void;
|
|
20
|
-
blurHandler: (event: FocusEvent) => void;
|
|
21
20
|
scrollHandler: () => void;
|
|
22
21
|
update(view: EditorView, prevState: EditorState): void;
|
|
22
|
+
closeMenu: () => void;
|
|
23
23
|
destroy(): void;
|
|
24
24
|
}
|
|
25
25
|
export declare class ImagePanelProsemirrorPlugin<I extends InlineContentSchema, S extends StyleSchema> extends EventEmitter<any> {
|
|
@@ -28,5 +28,7 @@ export declare class ImagePanelProsemirrorPlugin<I extends InlineContentSchema,
|
|
|
28
28
|
constructor(_editor: BlockNoteEditor<{
|
|
29
29
|
image: DefaultBlockSchema["image"];
|
|
30
30
|
}, I, S>);
|
|
31
|
+
get shown(): boolean;
|
|
31
32
|
onUpdate(callback: (state: ImagePanelState<I, S>) => void): () => void;
|
|
33
|
+
closeMenu: () => void;
|
|
32
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
3
|
-
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
4
3
|
import { UiElementPosition } from "../../extensions-shared/UiElementPosition";
|
|
4
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
5
5
|
import { EventEmitter } from "../../util/EventEmitter";
|
|
6
6
|
export type LinkToolbarState = UiElementPosition & {
|
|
7
7
|
url: string;
|
|
@@ -37,4 +37,6 @@ export declare class LinkToolbarProsemirrorPlugin<BSchema extends BlockSchema, I
|
|
|
37
37
|
* cursor exits the link toolbar.
|
|
38
38
|
*/
|
|
39
39
|
stopHideTimer: () => void;
|
|
40
|
+
get shown(): boolean;
|
|
41
|
+
closeMenu: () => void;
|
|
40
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin, PluginKey } from "prosemirror-state";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
3
|
-
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
4
3
|
import { UiElementPosition } from "../../extensions-shared/UiElementPosition";
|
|
4
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
5
5
|
import { EventEmitter } from "../../util/EventEmitter";
|
|
6
6
|
export type SuggestionMenuState = UiElementPosition & {
|
|
7
7
|
query: string;
|
|
@@ -27,5 +27,6 @@ export declare class SuggestionMenuProseMirrorPlugin<BSchema extends BlockSchema
|
|
|
27
27
|
removeTriggerCharacter: (triggerCharacter: string) => void;
|
|
28
28
|
closeMenu: () => void;
|
|
29
29
|
clearQuery: () => void;
|
|
30
|
+
get shown(): boolean;
|
|
30
31
|
}
|
|
31
32
|
export declare function createSuggestionMenu<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, triggerCharacter: string): void;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
slash_menu: {
|
|
3
|
+
heading: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtext: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
group: string;
|
|
8
|
+
};
|
|
9
|
+
heading_2: {
|
|
10
|
+
title: string;
|
|
11
|
+
subtext: string;
|
|
12
|
+
aliases: string[];
|
|
13
|
+
group: string;
|
|
14
|
+
};
|
|
15
|
+
heading_3: {
|
|
16
|
+
title: string;
|
|
17
|
+
subtext: string;
|
|
18
|
+
aliases: string[];
|
|
19
|
+
group: string;
|
|
20
|
+
};
|
|
21
|
+
numbered_list: {
|
|
22
|
+
title: string;
|
|
23
|
+
subtext: string;
|
|
24
|
+
aliases: string[];
|
|
25
|
+
group: string;
|
|
26
|
+
};
|
|
27
|
+
bullet_list: {
|
|
28
|
+
title: string;
|
|
29
|
+
subtext: string;
|
|
30
|
+
aliases: string[];
|
|
31
|
+
group: string;
|
|
32
|
+
};
|
|
33
|
+
paragraph: {
|
|
34
|
+
title: string;
|
|
35
|
+
subtext: string;
|
|
36
|
+
aliases: string[];
|
|
37
|
+
group: string;
|
|
38
|
+
};
|
|
39
|
+
table: {
|
|
40
|
+
title: string;
|
|
41
|
+
subtext: string;
|
|
42
|
+
aliases: string[];
|
|
43
|
+
group: string;
|
|
44
|
+
};
|
|
45
|
+
image: {
|
|
46
|
+
title: string;
|
|
47
|
+
subtext: string;
|
|
48
|
+
aliases: string[];
|
|
49
|
+
group: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
placeholders: {
|
|
53
|
+
default: string;
|
|
54
|
+
heading: string;
|
|
55
|
+
bulletListItem: string;
|
|
56
|
+
numberedListItem: string;
|
|
57
|
+
};
|
|
58
|
+
image: {
|
|
59
|
+
add_button: string;
|
|
60
|
+
};
|
|
61
|
+
side_menu: {
|
|
62
|
+
add_block_label: string;
|
|
63
|
+
drag_handle_label: string;
|
|
64
|
+
};
|
|
65
|
+
drag_handle: {
|
|
66
|
+
delete_menuitem: string;
|
|
67
|
+
colors_menuitem: string;
|
|
68
|
+
};
|
|
69
|
+
table_handle: {
|
|
70
|
+
delete_column_menuitem: string;
|
|
71
|
+
delete_row_menuitem: string;
|
|
72
|
+
add_left_menuitem: string;
|
|
73
|
+
add_right_menuitem: string;
|
|
74
|
+
add_above_menuitem: string;
|
|
75
|
+
add_below_menuitem: string;
|
|
76
|
+
};
|
|
77
|
+
suggestion_menu: {
|
|
78
|
+
no_items_title: string;
|
|
79
|
+
loading: string;
|
|
80
|
+
};
|
|
81
|
+
color_picker: {
|
|
82
|
+
text_title: string;
|
|
83
|
+
background_title: string;
|
|
84
|
+
colors: {
|
|
85
|
+
default: string;
|
|
86
|
+
gray: string;
|
|
87
|
+
brown: string;
|
|
88
|
+
red: string;
|
|
89
|
+
orange: string;
|
|
90
|
+
yellow: string;
|
|
91
|
+
green: string;
|
|
92
|
+
blue: string;
|
|
93
|
+
purple: string;
|
|
94
|
+
pink: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
formatting_toolbar: {
|
|
98
|
+
bold: {
|
|
99
|
+
tooltip: string;
|
|
100
|
+
secondary_tooltip: string;
|
|
101
|
+
};
|
|
102
|
+
italic: {
|
|
103
|
+
tooltip: string;
|
|
104
|
+
secondary_tooltip: string;
|
|
105
|
+
};
|
|
106
|
+
underline: {
|
|
107
|
+
tooltip: string;
|
|
108
|
+
secondary_tooltip: string;
|
|
109
|
+
};
|
|
110
|
+
strike: {
|
|
111
|
+
tooltip: string;
|
|
112
|
+
secondary_tooltip: string;
|
|
113
|
+
};
|
|
114
|
+
code: {
|
|
115
|
+
tooltip: string;
|
|
116
|
+
secondary_tooltip: string;
|
|
117
|
+
};
|
|
118
|
+
colors: {
|
|
119
|
+
tooltip: string;
|
|
120
|
+
};
|
|
121
|
+
link: {
|
|
122
|
+
tooltip: string;
|
|
123
|
+
secondary_tooltip: string;
|
|
124
|
+
};
|
|
125
|
+
image_caption: {
|
|
126
|
+
tooltip: string;
|
|
127
|
+
input_placeholder: string;
|
|
128
|
+
};
|
|
129
|
+
image_replace: {
|
|
130
|
+
tooltip: string;
|
|
131
|
+
};
|
|
132
|
+
nest: {
|
|
133
|
+
tooltip: string;
|
|
134
|
+
secondary_tooltip: string;
|
|
135
|
+
};
|
|
136
|
+
unnest: {
|
|
137
|
+
tooltip: string;
|
|
138
|
+
secondary_tooltip: string;
|
|
139
|
+
};
|
|
140
|
+
align_left: {
|
|
141
|
+
tooltip: string;
|
|
142
|
+
};
|
|
143
|
+
align_center: {
|
|
144
|
+
tooltip: string;
|
|
145
|
+
};
|
|
146
|
+
align_right: {
|
|
147
|
+
tooltip: string;
|
|
148
|
+
};
|
|
149
|
+
align_justify: {
|
|
150
|
+
tooltip: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
image_panel: {
|
|
154
|
+
upload: {
|
|
155
|
+
title: string;
|
|
156
|
+
file_placeholder: string;
|
|
157
|
+
upload_error: string;
|
|
158
|
+
};
|
|
159
|
+
embed: {
|
|
160
|
+
title: string;
|
|
161
|
+
embed_button: string;
|
|
162
|
+
url_placeholder: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
link_toolbar: {
|
|
166
|
+
delete: {
|
|
167
|
+
tooltip: string;
|
|
168
|
+
};
|
|
169
|
+
edit: {
|
|
170
|
+
text: string;
|
|
171
|
+
tooltip: string;
|
|
172
|
+
};
|
|
173
|
+
open: {
|
|
174
|
+
tooltip: string;
|
|
175
|
+
};
|
|
176
|
+
form: {
|
|
177
|
+
title_placeholder: string;
|
|
178
|
+
url_placeholder: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
generic: {
|
|
182
|
+
ctrl_shortcut: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export declare const fr: {
|
|
2
|
+
slash_menu: {
|
|
3
|
+
heading: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtext: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
group: string;
|
|
8
|
+
};
|
|
9
|
+
heading_2: {
|
|
10
|
+
title: string;
|
|
11
|
+
subtext: string;
|
|
12
|
+
aliases: string[];
|
|
13
|
+
group: string;
|
|
14
|
+
};
|
|
15
|
+
heading_3: {
|
|
16
|
+
title: string;
|
|
17
|
+
subtext: string;
|
|
18
|
+
aliases: string[];
|
|
19
|
+
group: string;
|
|
20
|
+
};
|
|
21
|
+
numbered_list: {
|
|
22
|
+
title: string;
|
|
23
|
+
subtext: string;
|
|
24
|
+
aliases: string[];
|
|
25
|
+
group: string;
|
|
26
|
+
};
|
|
27
|
+
bullet_list: {
|
|
28
|
+
title: string;
|
|
29
|
+
subtext: string;
|
|
30
|
+
aliases: string[];
|
|
31
|
+
group: string;
|
|
32
|
+
};
|
|
33
|
+
paragraph: {
|
|
34
|
+
title: string;
|
|
35
|
+
subtext: string;
|
|
36
|
+
aliases: string[];
|
|
37
|
+
group: string;
|
|
38
|
+
};
|
|
39
|
+
table: {
|
|
40
|
+
title: string;
|
|
41
|
+
subtext: string;
|
|
42
|
+
aliases: string[];
|
|
43
|
+
group: string;
|
|
44
|
+
};
|
|
45
|
+
image: {
|
|
46
|
+
title: string;
|
|
47
|
+
subtext: string;
|
|
48
|
+
aliases: string[];
|
|
49
|
+
group: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
placeholders: {
|
|
53
|
+
default: string;
|
|
54
|
+
heading: string;
|
|
55
|
+
bulletListItem: string;
|
|
56
|
+
numberedListItem: string;
|
|
57
|
+
};
|
|
58
|
+
image: {
|
|
59
|
+
add_button: string;
|
|
60
|
+
};
|
|
61
|
+
side_menu: {
|
|
62
|
+
add_block_label: string;
|
|
63
|
+
drag_handle_label: string;
|
|
64
|
+
};
|
|
65
|
+
drag_handle: {
|
|
66
|
+
delete_menuitem: string;
|
|
67
|
+
colors_menuitem: string;
|
|
68
|
+
};
|
|
69
|
+
table_handle: {
|
|
70
|
+
delete_column_menuitem: string;
|
|
71
|
+
delete_row_menuitem: string;
|
|
72
|
+
add_left_menuitem: string;
|
|
73
|
+
add_right_menuitem: string;
|
|
74
|
+
add_above_menuitem: string;
|
|
75
|
+
add_below_menuitem: string;
|
|
76
|
+
};
|
|
77
|
+
suggestion_menu: {
|
|
78
|
+
no_items_title: string;
|
|
79
|
+
loading: string;
|
|
80
|
+
};
|
|
81
|
+
color_picker: {
|
|
82
|
+
text_title: string;
|
|
83
|
+
background_title: string;
|
|
84
|
+
colors: {
|
|
85
|
+
default: string;
|
|
86
|
+
gray: string;
|
|
87
|
+
brown: string;
|
|
88
|
+
red: string;
|
|
89
|
+
orange: string;
|
|
90
|
+
yellow: string;
|
|
91
|
+
green: string;
|
|
92
|
+
blue: string;
|
|
93
|
+
purple: string;
|
|
94
|
+
pink: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
formatting_toolbar: {
|
|
98
|
+
bold: {
|
|
99
|
+
tooltip: string;
|
|
100
|
+
secondary_tooltip: string;
|
|
101
|
+
};
|
|
102
|
+
italic: {
|
|
103
|
+
tooltip: string;
|
|
104
|
+
secondary_tooltip: string;
|
|
105
|
+
};
|
|
106
|
+
underline: {
|
|
107
|
+
tooltip: string;
|
|
108
|
+
secondary_tooltip: string;
|
|
109
|
+
};
|
|
110
|
+
strike: {
|
|
111
|
+
tooltip: string;
|
|
112
|
+
secondary_tooltip: string;
|
|
113
|
+
};
|
|
114
|
+
code: {
|
|
115
|
+
tooltip: string;
|
|
116
|
+
secondary_tooltip: string;
|
|
117
|
+
};
|
|
118
|
+
colors: {
|
|
119
|
+
tooltip: string;
|
|
120
|
+
};
|
|
121
|
+
link: {
|
|
122
|
+
tooltip: string;
|
|
123
|
+
secondary_tooltip: string;
|
|
124
|
+
};
|
|
125
|
+
image_caption: {
|
|
126
|
+
tooltip: string;
|
|
127
|
+
input_placeholder: string;
|
|
128
|
+
};
|
|
129
|
+
image_replace: {
|
|
130
|
+
tooltip: string;
|
|
131
|
+
};
|
|
132
|
+
nest: {
|
|
133
|
+
tooltip: string;
|
|
134
|
+
secondary_tooltip: string;
|
|
135
|
+
};
|
|
136
|
+
unnest: {
|
|
137
|
+
tooltip: string;
|
|
138
|
+
secondary_tooltip: string;
|
|
139
|
+
};
|
|
140
|
+
align_left: {
|
|
141
|
+
tooltip: string;
|
|
142
|
+
};
|
|
143
|
+
align_center: {
|
|
144
|
+
tooltip: string;
|
|
145
|
+
};
|
|
146
|
+
align_right: {
|
|
147
|
+
tooltip: string;
|
|
148
|
+
};
|
|
149
|
+
align_justify: {
|
|
150
|
+
tooltip: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
image_panel: {
|
|
154
|
+
upload: {
|
|
155
|
+
title: string;
|
|
156
|
+
file_placeholder: string;
|
|
157
|
+
upload_error: string;
|
|
158
|
+
};
|
|
159
|
+
embed: {
|
|
160
|
+
title: string;
|
|
161
|
+
embed_button: string;
|
|
162
|
+
url_placeholder: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
link_toolbar: {
|
|
166
|
+
delete: {
|
|
167
|
+
tooltip: string;
|
|
168
|
+
};
|
|
169
|
+
edit: {
|
|
170
|
+
text: string;
|
|
171
|
+
tooltip: string;
|
|
172
|
+
};
|
|
173
|
+
open: {
|
|
174
|
+
tooltip: string;
|
|
175
|
+
};
|
|
176
|
+
form: {
|
|
177
|
+
title_placeholder: string;
|
|
178
|
+
url_placeholder: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
generic: {
|
|
182
|
+
ctrl_shortcut: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
package/types/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as locales from "./i18n/locales";
|
|
1
2
|
export * from "./api/exporters/html/externalHTMLExporter";
|
|
2
3
|
export * from "./api/exporters/html/internalHTMLSerializer";
|
|
3
4
|
export * from "./api/testUtil";
|
|
@@ -24,4 +25,6 @@ export * from "./util/string";
|
|
|
24
25
|
export * from "./api/nodeConversions/nodeConversions";
|
|
25
26
|
export * from "./api/testUtil/partialBlockTestUtil";
|
|
26
27
|
export * from "./extensions/UniqueID/UniqueID";
|
|
27
|
-
export
|
|
28
|
+
export * from "./i18n/dictionary";
|
|
29
|
+
export { UnreachableCaseError, assertEmpty } from "./util/typescript";
|
|
30
|
+
export { locales };
|
|
@@ -25,5 +25,5 @@ export declare const BlockContainer: Node<{
|
|
|
25
25
|
blockContent: Record<string, string>;
|
|
26
26
|
inlineContent: Record<string, string>;
|
|
27
27
|
}> | undefined;
|
|
28
|
-
editor: BlockNoteEditor<
|
|
28
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
29
29
|
}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const isAppleOS: () => boolean;
|
|
2
|
-
export declare function formatKeyboardShortcut(shortcut: string): string;
|
|
2
|
+
export declare function formatKeyboardShortcut(shortcut: string, ctrlText?: string): string;
|
|
3
3
|
export declare function mergeCSSClasses(...classes: string[]): string;
|
|
4
4
|
export declare const isSafari: () => boolean;
|