@blocknote/core 0.22.0 → 0.23.1

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.
Files changed (69) hide show
  1. package/dist/blocknote.js +2416 -1808
  2. package/dist/blocknote.js.map +1 -1
  3. package/dist/blocknote.umd.cjs +7 -7
  4. package/dist/blocknote.umd.cjs.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/dist/webpack-stats.json +1 -1
  8. package/package.json +2 -2
  9. package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -0
  10. package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -0
  11. package/src/api/clipboard/clipboardInternal.test.ts +126 -0
  12. package/src/api/exporters/html/__snapshots__/pageBreak/basic/external.html +1 -0
  13. package/src/api/exporters/html/__snapshots__/pageBreak/basic/internal.html +1 -0
  14. package/src/api/exporters/markdown/__snapshots__/pageBreak/basic/markdown.md +0 -0
  15. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +16 -0
  16. package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +62 -0
  17. package/src/api/parsers/html/parseHTML.test.ts +9 -0
  18. package/src/api/testUtil/cases/defaultSchema.ts +15 -1
  19. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +32 -11
  20. package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +0 -9
  21. package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +1 -1
  22. package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +1 -1
  23. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +1 -1
  24. package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +49 -0
  25. package/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts +45 -0
  26. package/src/blocks/PageBreakBlockContent/schema.ts +40 -0
  27. package/src/editor/Block.css +15 -1
  28. package/src/editor/BlockNoteEditor.ts +37 -12
  29. package/src/editor/BlockNoteExtensions.ts +111 -16
  30. package/src/editor/editor.css +22 -7
  31. package/src/extensions/SideMenu/SideMenuPlugin.ts +128 -23
  32. package/src/extensions/SideMenu/dragging.ts +0 -1
  33. package/src/extensions/SuggestionMenu/DefaultSuggestionItem.ts +1 -1
  34. package/src/i18n/locales/ar.ts +6 -0
  35. package/src/i18n/locales/de.ts +6 -0
  36. package/src/i18n/locales/en.ts +6 -0
  37. package/src/i18n/locales/es.ts +6 -0
  38. package/src/i18n/locales/fr.ts +47 -17
  39. package/src/i18n/locales/hr.ts +72 -54
  40. package/src/i18n/locales/index.ts +1 -0
  41. package/src/i18n/locales/is.ts +6 -0
  42. package/src/i18n/locales/it.ts +315 -0
  43. package/src/i18n/locales/ja.ts +6 -0
  44. package/src/i18n/locales/ko.ts +6 -0
  45. package/src/i18n/locales/nl.ts +6 -0
  46. package/src/i18n/locales/pl.ts +6 -0
  47. package/src/i18n/locales/pt.ts +6 -0
  48. package/src/i18n/locales/ru.ts +6 -0
  49. package/src/i18n/locales/vi.ts +6 -0
  50. package/src/i18n/locales/zh.ts +6 -0
  51. package/src/index.ts +3 -0
  52. package/types/src/api/testUtil/cases/defaultSchema.d.ts +2 -1
  53. package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +2 -0
  54. package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +31 -0
  55. package/types/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.d.ts +8 -0
  56. package/types/src/blocks/PageBreakBlockContent/schema.d.ts +86 -0
  57. package/types/src/editor/BlockNoteEditor.d.ts +18 -2
  58. package/types/src/editor/BlockNoteExtensions.d.ts +2 -0
  59. package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +26 -5
  60. package/types/src/extensions/SuggestionMenu/DefaultSuggestionItem.d.ts +1 -1
  61. package/types/src/i18n/locales/de.d.ts +6 -0
  62. package/types/src/i18n/locales/en.d.ts +6 -0
  63. package/types/src/i18n/locales/es.d.ts +6 -0
  64. package/types/src/i18n/locales/hr.d.ts +6 -0
  65. package/types/src/i18n/locales/index.d.ts +1 -0
  66. package/types/src/i18n/locales/it.d.ts +245 -0
  67. package/types/src/index.d.ts +3 -0
  68. package/types/src/pm-nodes/BlockContainer.d.ts +1 -1
  69. package/types/src/pm-nodes/BlockGroup.d.ts +1 -1
@@ -1,6 +1,6 @@
1
- import { PluginView } from "@tiptap/pm/state";
2
- import { EditorState, Plugin, PluginKey } from "prosemirror-state";
3
- import { EditorView } from "prosemirror-view";
1
+ import { DOMParser, Slice } from "@tiptap/pm/model";
2
+ import { EditorState, Plugin, PluginKey, PluginView } from "@tiptap/pm/state";
3
+ import { EditorView } from "@tiptap/pm/view";
4
4
 
5
5
  import { Block } from "../../blocks/defaultBlocks.js";
6
6
  import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
@@ -14,6 +14,7 @@ import { EventEmitter } from "../../util/EventEmitter.js";
14
14
  import { initializeESMDependencies } from "../../util/esmDependencies.js";
15
15
  import { getDraggableBlockFromElement } from "../getDraggableBlockFromElement.js";
16
16
  import { dragStart, unsetDragImage } from "./dragging.js";
17
+
17
18
  export type SideMenuState<
18
19
  BSchema extends BlockSchema,
19
20
  I extends InlineContentSchema,
@@ -28,9 +29,14 @@ const PERCENTAGE_OF_BLOCK_WIDTH_CONSIDERED_SIDE_DROP = 0.1;
28
29
  function getBlockFromCoords(
29
30
  view: EditorView,
30
31
  coords: { left: number; top: number },
32
+ sideMenuDetection: "viewport" | "editor",
31
33
  adjustForColumns = true
32
34
  ) {
33
- const elements = view.root.elementsFromPoint(coords.left, coords.top);
35
+ const elements = view.root.elementsFromPoint(
36
+ // bit hacky - offset x position to right to account for the width of sidemenu itself
37
+ coords.left + (sideMenuDetection === "editor" ? 50 : 0),
38
+ coords.top
39
+ );
34
40
 
35
41
  for (const element of elements) {
36
42
  if (!view.dom.contains(element)) {
@@ -46,6 +52,7 @@ function getBlockFromCoords(
46
52
  left: coords.left + 50, // bit hacky, but if we're inside a column, offset x position to right to account for the width of sidemenu itself
47
53
  top: coords.top,
48
54
  },
55
+ sideMenuDetection,
49
56
  false
50
57
  );
51
58
  }
@@ -60,7 +67,8 @@ function getBlockFromMousePos(
60
67
  x: number;
61
68
  y: number;
62
69
  },
63
- view: EditorView
70
+ view: EditorView,
71
+ sideMenuDetection: "viewport" | "editor"
64
72
  ): { node: HTMLElement; id: string } | undefined {
65
73
  // Editor itself may have padding or other styling which affects
66
74
  // size/position, so we get the boundingRect of the first child (i.e. the
@@ -76,7 +84,7 @@ function getBlockFromMousePos(
76
84
 
77
85
  // this.horizontalPosAnchor = editorBoundingBox.x;
78
86
 
79
- // Gets block at mouse cursor's vertical position.
87
+ // Gets block at mouse cursor's position.
80
88
  const coords = {
81
89
  left: mousePos.x,
82
90
  top: mousePos.y,
@@ -85,15 +93,18 @@ function getBlockFromMousePos(
85
93
  const mouseLeftOfEditor = coords.left < editorBoundingBox.left;
86
94
  const mouseRightOfEditor = coords.left > editorBoundingBox.right;
87
95
 
88
- if (mouseLeftOfEditor) {
89
- coords.left = editorBoundingBox.left + 10;
90
- }
96
+ // Clamps the x position to the editor's bounding box.
97
+ if (sideMenuDetection === "viewport") {
98
+ if (mouseLeftOfEditor) {
99
+ coords.left = editorBoundingBox.left + 10;
100
+ }
91
101
 
92
- if (mouseRightOfEditor) {
93
- coords.left = editorBoundingBox.right - 10;
102
+ if (mouseRightOfEditor) {
103
+ coords.left = editorBoundingBox.right - 10;
104
+ }
94
105
  }
95
106
 
96
- let block = getBlockFromCoords(view, coords);
107
+ let block = getBlockFromCoords(view, coords, sideMenuDetection);
97
108
 
98
109
  if (!mouseRightOfEditor && block) {
99
110
  // note: this case is not necessary when we're on the right side of the editor
@@ -101,14 +112,14 @@ function getBlockFromMousePos(
101
112
  /* Now, because blocks can be nested
102
113
  | BlockA |
103
114
  x | BlockB y|
104
-
115
+
105
116
  hovering over position x (the "margin of block B") will return block A instead of block B.
106
117
  to fix this, we get the block from the right side of block A (position y, which will fall in BlockB correctly)
107
118
  */
108
119
 
109
120
  const rect = block.node.getBoundingClientRect();
110
121
  coords.left = rect.right - 10;
111
- block = getBlockFromCoords(view, coords, false);
122
+ block = getBlockFromCoords(view, coords, "viewport", false);
112
123
  }
113
124
 
114
125
  return block;
@@ -132,8 +143,11 @@ export class SideMenuView<
132
143
 
133
144
  public menuFrozen = false;
134
145
 
146
+ public isDragOrigin = false;
147
+
135
148
  constructor(
136
149
  private readonly editor: BlockNoteEditor<BSchema, I, S>,
150
+ private readonly sideMenuDetection: "viewport" | "editor",
137
151
  private readonly pmView: EditorView,
138
152
  emitUpdate: (state: SideMenuState<BSchema, I, S>) => void
139
153
  ) {
@@ -146,14 +160,18 @@ export class SideMenuView<
146
160
  };
147
161
 
148
162
  this.pmView.root.addEventListener(
149
- "drop",
150
- this.onDrop as EventListener,
151
- true
163
+ "dragstart",
164
+ this.onDragStart as EventListener
152
165
  );
153
166
  this.pmView.root.addEventListener(
154
167
  "dragover",
155
168
  this.onDragOver as EventListener
156
169
  );
170
+ this.pmView.root.addEventListener(
171
+ "drop",
172
+ this.onDrop as EventListener,
173
+ true
174
+ );
157
175
  initializeESMDependencies();
158
176
 
159
177
  // Shows or updates menu position whenever the cursor moves, if the menu isn't frozen.
@@ -169,6 +187,11 @@ export class SideMenuView<
169
187
  this.onKeyDown as EventListener,
170
188
  true
171
189
  );
190
+
191
+ // Setting capture=true ensures that any parent container of the editor that
192
+ // gets scrolled will trigger the scroll event. Scroll events do not bubble
193
+ // and so won't propagate to the document by default.
194
+ pmView.root.addEventListener("scroll", this.onScroll, true);
172
195
  }
173
196
 
174
197
  updateState = (state: SideMenuState<BSchema, I, S>) => {
@@ -181,7 +204,11 @@ export class SideMenuView<
181
204
  return;
182
205
  }
183
206
 
184
- const block = getBlockFromMousePos(this.mousePos, this.pmView);
207
+ const block = getBlockFromMousePos(
208
+ this.mousePos,
209
+ this.pmView,
210
+ this.sideMenuDetection
211
+ );
185
212
 
186
213
  // Closes the menu if the mouse cursor is beyond the editor vertically.
187
214
  if (!block || !this.editor.isEditable) {
@@ -249,7 +276,16 @@ export class SideMenuView<
249
276
  onDrop = (event: DragEvent) => {
250
277
  this.editor._tiptapEditor.commands.blur();
251
278
 
279
+ // ProseMirror doesn't remove the dragged content if it's dropped outside
280
+ // the editor (e.g. to other editors), so we need to do it manually. Since
281
+ // the dragged content is the same as the selected content, we can just
282
+ // delete the selection.
283
+ if (this.isDragOrigin && !this.pmView.dom.contains(event.target as Node)) {
284
+ this.pmView.dispatch(this.pmView.state.tr.deleteSelection());
285
+ }
286
+
252
287
  if (
288
+ this.sideMenuDetection === "editor" ||
253
289
  (event as any).synthetic ||
254
290
  !event.dataTransfer?.types.includes("blocknote/html")
255
291
  ) {
@@ -268,6 +304,46 @@ export class SideMenuView<
268
304
  }
269
305
  };
270
306
 
307
+ /**
308
+ * If a block is being dragged, ProseMirror usually gets the context of what's
309
+ * being dragged from `view.dragging`, which is automatically set when a
310
+ * `dragstart` event fires in the editor. However, if the user tries to drag
311
+ * and drop blocks between multiple editors, only the one in which the drag
312
+ * began has that context, so we need to set it on the others manually. This
313
+ * ensures that PM always drops the blocks in between other blocks, and not
314
+ * inside them.
315
+ *
316
+ * After the `dragstart` event fires on the drag handle, it sets
317
+ * `blocknote/html` data on the clipboard. This handler fires right after,
318
+ * parsing the `blocknote/html` data into nodes and setting them on
319
+ * `view.dragging`.
320
+ *
321
+ * Note: Setting `view.dragging` on `dragover` would be better as the user
322
+ * could then drag between editors in different windows, but you can only
323
+ * access `dataTransfer` contents on `dragstart` and `drop` events.
324
+ */
325
+ onDragStart = (event: DragEvent) => {
326
+ if (!this.pmView.dragging) {
327
+ const html = event.dataTransfer?.getData("blocknote/html");
328
+ if (!html) {
329
+ return;
330
+ }
331
+
332
+ const element = document.createElement("div");
333
+ element.innerHTML = html;
334
+
335
+ const parser = DOMParser.fromSchema(this.pmView.state.schema);
336
+ const node = parser.parse(element, {
337
+ topNode: this.pmView.state.schema.nodes["blockGroup"].create(),
338
+ });
339
+
340
+ this.pmView.dragging = {
341
+ slice: new Slice(node.content, 0, 0),
342
+ move: true,
343
+ };
344
+ }
345
+ };
346
+
271
347
  /**
272
348
  * If the event is outside the editor contents,
273
349
  * we dispatch a fake event, so that we can still drop the content
@@ -275,11 +351,13 @@ export class SideMenuView<
275
351
  */
276
352
  onDragOver = (event: DragEvent) => {
277
353
  if (
354
+ this.sideMenuDetection === "editor" ||
278
355
  (event as any).synthetic ||
279
356
  !event.dataTransfer?.types.includes("blocknote/html")
280
357
  ) {
281
358
  return;
282
359
  }
360
+
283
361
  const pos = this.pmView.posAtCoords({
284
362
  left: event.clientX,
285
363
  top: event.clientY,
@@ -400,6 +478,13 @@ export class SideMenuView<
400
478
  return evt;
401
479
  }
402
480
 
481
+ onScroll = () => {
482
+ if (this.state?.show) {
483
+ this.state.referencePos = this.hoveredBlock!.getBoundingClientRect();
484
+ this.emitUpdate(this.state);
485
+ }
486
+ };
487
+
403
488
  // Needed in cases where the editor state updates without the mouse cursor
404
489
  // moving, as some state updates can require a side menu update. For example,
405
490
  // adding a button to the side menu which removes the block can cause the
@@ -424,11 +509,14 @@ export class SideMenuView<
424
509
  this.onMouseMove as EventListener,
425
510
  true
426
511
  );
512
+ this.pmView.root.removeEventListener(
513
+ "dragstart",
514
+ this.onDragStart as EventListener
515
+ );
427
516
  this.pmView.root.removeEventListener(
428
517
  "dragover",
429
518
  this.onDragOver as EventListener
430
519
  );
431
-
432
520
  this.pmView.root.removeEventListener(
433
521
  "drop",
434
522
  this.onDrop as EventListener,
@@ -439,6 +527,7 @@ export class SideMenuView<
439
527
  this.onKeyDown as EventListener,
440
528
  true
441
529
  );
530
+ this.pmView.root.removeEventListener("scroll", this.onScroll, true);
442
531
  }
443
532
  }
444
533
 
@@ -452,14 +541,22 @@ export class SideMenuProsemirrorPlugin<
452
541
  public view: SideMenuView<BSchema, I, S> | undefined;
453
542
  public readonly plugin: Plugin;
454
543
 
455
- constructor(private readonly editor: BlockNoteEditor<BSchema, I, S>) {
544
+ constructor(
545
+ private readonly editor: BlockNoteEditor<BSchema, I, S>,
546
+ sideMenuDetection: "viewport" | "editor"
547
+ ) {
456
548
  super();
457
549
  this.plugin = new Plugin({
458
550
  key: sideMenuPluginKey,
459
551
  view: (editorView) => {
460
- this.view = new SideMenuView(editor, editorView, (state) => {
461
- this.emit("update", state);
462
- });
552
+ this.view = new SideMenuView(
553
+ editor,
554
+ sideMenuDetection,
555
+ editorView,
556
+ (state) => {
557
+ this.emit("update", state);
558
+ }
559
+ );
463
560
  return this.view;
464
561
  },
465
562
  });
@@ -479,6 +576,10 @@ export class SideMenuProsemirrorPlugin<
479
576
  },
480
577
  block: Block<BSchema, I, S>
481
578
  ) => {
579
+ if (this.view) {
580
+ this.view.isDragOrigin = true;
581
+ }
582
+
482
583
  dragStart(event, block, this.editor);
483
584
  };
484
585
 
@@ -489,6 +590,10 @@ export class SideMenuProsemirrorPlugin<
489
590
  if (this.editor.prosemirrorView) {
490
591
  unsetDragImage(this.editor.prosemirrorView.root);
491
592
  }
593
+
594
+ if (this.view) {
595
+ this.view.isDragOrigin = false;
596
+ }
492
597
  };
493
598
  /**
494
599
  * Freezes the side menu. When frozen, the side menu will stay
@@ -202,6 +202,5 @@ export function dragStart<
202
202
  e.dataTransfer.setData("text/plain", plainText);
203
203
  e.dataTransfer.effectAllowed = "move";
204
204
  e.dataTransfer.setDragImage(dragImageElement!, 0, 0);
205
- view.dragging = { slice: selectedSlice, move: true };
206
205
  }
207
206
  }
@@ -1,7 +1,7 @@
1
1
  import type { Dictionary } from "../../i18n/dictionary.js";
2
2
 
3
3
  export type DefaultSuggestionItem = {
4
- key: keyof Dictionary["slash_menu"];
4
+ key: keyof Omit<Dictionary["slash_menu"], "page_break">;
5
5
  title: string;
6
6
  onItemClick: () => void;
7
7
  subtext?: string;
@@ -58,6 +58,12 @@ export const ar: Dictionary = {
58
58
  aliases: ["كود", "مسبق"],
59
59
  group: "الكتل الأساسية",
60
60
  },
61
+ page_break: {
62
+ title: "فاصل الصفحة",
63
+ subtext: "فاصل الصفحة",
64
+ aliases: ["page", "break", "separator", "فاصل", "الصفحة"],
65
+ group: "الكتل الأساسية",
66
+ },
61
67
  table: {
62
68
  title: "جدول",
63
69
  subtext: "يستخدم للجداول",
@@ -56,6 +56,12 @@ export const de = {
56
56
  aliases: ["code", "pre"],
57
57
  group: "Grundlegende blöcke",
58
58
  },
59
+ page_break: {
60
+ title: "Seitenumbruch",
61
+ subtext: "Seitentrenner",
62
+ aliases: ["page", "break", "separator", "seitenumbruch", "trenner"],
63
+ group: "Grundlegende Blöcke",
64
+ },
59
65
  table: {
60
66
  title: "Tabelle",
61
67
  subtext: "Tabelle mit editierbaren Zellen",
@@ -56,6 +56,12 @@ export const en = {
56
56
  aliases: ["code", "pre"],
57
57
  group: "Basic blocks",
58
58
  },
59
+ page_break: {
60
+ title: "Page Break",
61
+ subtext: "Page separator",
62
+ aliases: ["page", "break", "separator"],
63
+ group: "Basic blocks",
64
+ },
59
65
  table: {
60
66
  title: "Table",
61
67
  subtext: "Table with editable cells",
@@ -55,6 +55,12 @@ export const es = {
55
55
  aliases: ["code", "pre"],
56
56
  group: "Bloques básicos",
57
57
  },
58
+ page_break: {
59
+ title: "Salto de página",
60
+ subtext: "Separador de página",
61
+ aliases: ["page", "break", "separator", "salto", "separador"],
62
+ group: "Bloques básicos",
63
+ },
58
64
  table: {
59
65
  title: "Tabla",
60
66
  subtext: "Tabla con celdas editables",
@@ -10,13 +10,14 @@ export const fr: Dictionary = {
10
10
  },
11
11
  heading_2: {
12
12
  title: "Titre 2",
13
- subtext: "Utilisé pour les sections clés",
13
+ subtext: "Titre de deuxième niveau Utilisé pour les sections clés",
14
14
  aliases: ["h2", "titre2", "sous-titre"],
15
15
  group: "Titres",
16
16
  },
17
17
  heading_3: {
18
18
  title: "Titre 3",
19
- subtext: "Utilisé pour les sous-sections et les titres de groupe",
19
+ subtext:
20
+ "Titre de troisième niveau utilisé pour les sous-sections et les titres de groupe",
20
21
  aliases: ["h3", "titre3", "sous-titre"],
21
22
  group: "Titres",
22
23
  },
@@ -27,13 +28,21 @@ export const fr: Dictionary = {
27
28
  group: "Blocs de base",
28
29
  },
29
30
  bullet_list: {
30
- title: "Liste à Puces",
31
- subtext: "Utilisé pour afficher une liste non ordonnée",
32
- aliases: ["ul", "li", "liste", "listeàpuces", "liste à puces"],
31
+ title: "Liste à puces",
32
+ subtext: "Utilisé pour afficher une liste à puce non numérotée",
33
+ aliases: [
34
+ "ul",
35
+ "li",
36
+ "liste",
37
+ "listeàpuces",
38
+ "liste à puces",
39
+ "bullet points",
40
+ "bulletpoints",
41
+ ],
33
42
  group: "Blocs de base",
34
43
  },
35
44
  check_list: {
36
- title: "Liste de vérification",
45
+ title: "Liste de tâches",
37
46
  subtext: "Utilisé pour afficher une liste avec des cases à cocher",
38
47
  aliases: [
39
48
  "ul",
@@ -42,13 +51,18 @@ export const fr: Dictionary = {
42
51
  "liste de vérification",
43
52
  "liste cochée",
44
53
  "case à cocher",
54
+ "checklist",
55
+ "checkbox",
56
+ "check box",
57
+ "to do",
58
+ "todo",
45
59
  ],
46
60
  group: "Blocs de base",
47
61
  },
48
62
  paragraph: {
49
63
  title: "Paragraphe",
50
64
  subtext: "Utilisé pour le corps de votre document",
51
- aliases: ["p", "paragraphe"],
65
+ aliases: ["p", "paragraphe", "texte"],
52
66
  group: "Blocs de base",
53
67
  },
54
68
  code_block: {
@@ -57,10 +71,16 @@ export const fr: Dictionary = {
57
71
  aliases: ["code", "pre"],
58
72
  group: "Blocs de base",
59
73
  },
74
+ page_break: {
75
+ title: "Saut de page",
76
+ subtext: "Séparateur de page",
77
+ aliases: ["page", "break", "separator", "saut", "séparateur"],
78
+ group: "Blocs de base",
79
+ },
60
80
  table: {
61
81
  title: "Tableau",
62
82
  subtext: "Utilisé pour les tableaux",
63
- aliases: ["tableau"],
83
+ aliases: ["tableau", "grille"],
64
84
  group: "Avancé",
65
85
  },
66
86
  image: {
@@ -69,7 +89,9 @@ export const fr: Dictionary = {
69
89
  aliases: [
70
90
  "image",
71
91
  "uploadImage",
72
- "télécharger",
92
+ "télécharger image",
93
+ "téléverser image",
94
+ "uploader image",
73
95
  "img",
74
96
  "photo",
75
97
  "média",
@@ -82,8 +104,8 @@ export const fr: Dictionary = {
82
104
  subtext: "Insérer une vidéo",
83
105
  aliases: [
84
106
  "vidéo",
85
- "téléchargerVidéo",
86
- "téléverser",
107
+ "télécharger vidéo",
108
+ "téléverser vidéo",
87
109
  "mp4",
88
110
  "film",
89
111
  "média",
@@ -96,8 +118,8 @@ export const fr: Dictionary = {
96
118
  subtext: "Insérer un audio",
97
119
  aliases: [
98
120
  "audio",
99
- "téléchargerAudio",
100
- "téléverser",
121
+ "télécharger audio",
122
+ "téléverser audio",
101
123
  "mp3",
102
124
  "son",
103
125
  "média",
@@ -108,18 +130,26 @@ export const fr: Dictionary = {
108
130
  file: {
109
131
  title: "Fichier",
110
132
  subtext: "Insérer un fichier",
111
- aliases: ["fichier", "téléverser", "intégrer", "média", "url"],
133
+ aliases: [
134
+ "fichier",
135
+ "téléverser fichier",
136
+ "intégrer fichier",
137
+ "insérer fichier",
138
+ "média",
139
+ "url",
140
+ ],
112
141
  group: "Média",
113
142
  },
114
143
  emoji: {
115
144
  title: "Emoji",
116
145
  subtext: "Utilisé pour insérer un emoji",
117
- aliases: ["emoji", "émoticône", "émotion", "visage"],
146
+ aliases: ["emoji", "émoticône", "émotion", "visage", "smiley"],
118
147
  group: "Autres",
119
148
  },
120
149
  },
121
150
  placeholders: {
122
- default: "Entrez du texte ou tapez '/' pour les commandes",
151
+ default:
152
+ "Entrez du texte ou tapez '/' pour faire apparaître les options de mise en page",
123
153
  heading: "Titre",
124
154
  bulletListItem: "Liste",
125
155
  numberedListItem: "Liste",
@@ -280,7 +310,7 @@ export const fr: Dictionary = {
280
310
  audio: "Télécharger un fichier audio",
281
311
  file: "Télécharger un fichier",
282
312
  },
283
- upload_error: "Erreur : Échec du téléchargement",
313
+ upload_error: "Erreur : échec du téléchargement",
284
314
  },
285
315
  embed: {
286
316
  title: "Intégrer",