autumnnote 1.0.8 → 1.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autumnnote",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A modern, lightweight WYSIWYG editor — built with vanilla JavaScript, no jQuery required.",
5
5
  "main": "dist/autumnnote.umd.js",
6
6
  "module": "dist/autumnnote.es.js",
package/src/js/Context.js CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { mergeDeep } from './core/func.js';
8
8
  import { defaultOptions } from './settings.js';
9
+ import { resolveLocale } from './i18n/index.js';
9
10
  import { renderLayout } from './renderer.js';
10
11
  import { on } from './core/dom.js';
11
12
 
@@ -46,6 +47,9 @@ export class Context {
46
47
  this.targetEl = targetEl;
47
48
  this.options = mergeDeep(defaultOptions, userOptions);
48
49
 
50
+ /** @type {import('./i18n/index.js').AsnLocale} */
51
+ this.locale = resolveLocale(this.options.lang);
52
+
49
53
  /** @type {{ container: HTMLElement, editable: HTMLElement, toolbar?: HTMLElement, statusbar?: HTMLElement }} */
50
54
  this.layoutInfo = {};
51
55
 
@@ -0,0 +1,320 @@
1
+ /**
2
+ * de.js - German locale
3
+ * Deep-merged over en.js; only keys that differ from English are listed.
4
+ */
5
+
6
+ /** @type {Partial<import('../../../types/index.js').AsnLocale>} */
7
+ export const de = {
8
+ toolbar: {
9
+ bold: 'Fett (Ctrl+B)',
10
+ italic: 'Kursiv (Ctrl+I)',
11
+ underline: 'Unterstrichen (Ctrl+U)',
12
+ strikethrough: 'Durchgestrichen',
13
+ superscript: 'Hochgestellt',
14
+ subscript: 'Tiefgestellt',
15
+ alignLeft: 'Linksbündig',
16
+ alignCenter: 'Zentriert',
17
+ alignRight: 'Rechtsbündig',
18
+ alignJustify: 'Blocksatz',
19
+ ul: 'Ungeordnete Liste',
20
+ ol: 'Geordnete Liste',
21
+ checklist: 'Checkliste',
22
+ indent: 'Einzug vergrößern',
23
+ outdent: 'Einzug verkleinern',
24
+ undo: 'Rückgängig (Ctrl+Z)',
25
+ redo: 'Wiederholen (Ctrl+Y)',
26
+ hr: 'Horizontale Linie',
27
+ link: 'Link einfügen',
28
+ image: 'Bild einfügen',
29
+ video: 'Video einfügen',
30
+ emoji: 'Emoji einfügen',
31
+ icon: 'FA-Symbol einfügen',
32
+ table: 'Tabelle einfügen',
33
+ fontSize: 'Schriftgröße',
34
+ fontSizePlaceholder: 'Größe',
35
+ removeFormat: 'Formatierung entfernen',
36
+ direction: 'Textrichtung umschalten (LTR / RTL)',
37
+ fontFamily: 'Schriftart',
38
+ paragraphStyle: 'Absatzstil',
39
+ paragraphStylePlaceholder: 'Stil',
40
+ lineHeight: 'Zeilenhöhe',
41
+ lineHeightPlaceholder: '↕ Zeile',
42
+ codeview: 'HTML-Code-Ansicht',
43
+ fullscreen: 'Vollbild',
44
+ shortcuts: 'Tastenkürzel (Ctrl+Shift+/)',
45
+ find: 'Suchen (Ctrl+F)',
46
+ findReplace: 'Suchen & Ersetzen (Ctrl+H)',
47
+ inlineCode: 'Inline-Code (Ctrl+`)',
48
+ print: 'Drucken',
49
+ foreColor: 'Textfarbe',
50
+ backColor: 'Hervorhebungsfarbe',
51
+ chooseTextColor: 'Textfarbe auswählen',
52
+ chooseHighlightColor: 'Hervorhebungsfarbe auswählen',
53
+ customColor: 'Benutzerdefinierte Farbe',
54
+ insertTableLabel: 'Tabelle einfügen',
55
+ paragraphItems: {
56
+ p: 'Normal',
57
+ blockquote: 'Zitat',
58
+ pre: 'Code',
59
+ },
60
+ },
61
+
62
+ linkDialog: {
63
+ ariaLabel: 'Link einfügen',
64
+ title: 'Link einfügen',
65
+ url: 'URL',
66
+ urlPlaceholder: 'https://',
67
+ displayText: 'Anzeigetext',
68
+ textPlaceholder: 'Linktext',
69
+ openInNewTab: 'In neuem Tab öffnen',
70
+ insertBtn: 'Einfügen',
71
+ cancelBtn: 'Abbrechen',
72
+ },
73
+
74
+ imageDialog: {
75
+ ariaLabel: 'Bild einfügen',
76
+ title: 'Bild einfügen',
77
+ imageUrl: 'Bild-URL',
78
+ urlPlaceholder: 'https://example.com/image.png',
79
+ altText: 'Alt-Text',
80
+ altPlaceholder: 'Bild beschreiben',
81
+ alignment: 'Ausrichtung',
82
+ alignNone: 'Keine',
83
+ alignLeft: 'Links',
84
+ alignCenter: 'Mitte',
85
+ alignRight: 'Rechts',
86
+ uploadLabel: 'Oder Datei hochladen',
87
+ insertBtn: 'Einfügen',
88
+ cancelBtn: 'Abbrechen',
89
+ },
90
+
91
+ videoDialog: {
92
+ ariaLabel: 'Video einfügen',
93
+ title: 'Video einfügen',
94
+ videoUrl: 'Video-URL',
95
+ urlPlaceholder: 'YouTube, Vimeo oder direkte .mp4-URL',
96
+ widthLabel: 'Breite (px)',
97
+ widthPlaceholder: '560',
98
+ insertBtn: 'Einfügen',
99
+ cancelBtn: 'Abbrechen',
100
+ detected: (type) => `Erkannt: ${type}`,
101
+ unknownFormat: 'Unbekanntes Format — direktes Video-Einbetten wird versucht',
102
+ invalidUrl: 'Ungültige URL — bitte geben Sie einen gültigen Videolink ein.',
103
+ },
104
+
105
+ emojiDialog: {
106
+ ariaLabel: 'Emoji einfügen',
107
+ title: 'Emoji einfügen',
108
+ searchPlaceholder: 'Emojis suchen…',
109
+ all: 'Alle',
110
+ cancelBtn: 'Abbrechen',
111
+ close: 'Schließen',
112
+ categories: {
113
+ smileys: 'Smileys',
114
+ people: 'Menschen',
115
+ animals: 'Tiere',
116
+ food: 'Essen',
117
+ travel: 'Reisen',
118
+ objects: 'Objekte',
119
+ symbols: 'Symbole',
120
+ },
121
+ },
122
+
123
+ iconDialog: {
124
+ ariaLabel: 'FA-Symbol einfügen',
125
+ title: 'FA-Symbol einfügen',
126
+ searchPlaceholder: 'Symbole suchen…',
127
+ all: 'Alle',
128
+ style: 'Stil',
129
+ size: 'Größe',
130
+ color: 'Farbe',
131
+ useColor: ' Farbe verwenden',
132
+ selectHint: 'Symbol auswählen',
133
+ insertBtn: 'FA-Symbol einfügen',
134
+ cancelBtn: 'Abbrechen',
135
+ close: 'Schließen',
136
+ categories: {
137
+ popular: 'Beliebt',
138
+ interface: 'Benutzeroberfläche',
139
+ navigation: 'Navigation',
140
+ media: 'Medien',
141
+ communication: 'Kommunikation',
142
+ files: 'Dateien',
143
+ people: 'Menschen',
144
+ objects: 'Objekte',
145
+ },
146
+ },
147
+
148
+ findReplace: {
149
+ findTitle: 'Suchen',
150
+ findReplaceTitle: 'Suchen & Ersetzen',
151
+ findPlaceholder: 'Suchen…',
152
+ searchAriaLabel: 'Suchtext',
153
+ caseSensitive: '\u00a0Groß-/Kleinschreibung',
154
+ prevBtn: '← Zurück',
155
+ nextBtn: 'Weiter →',
156
+ replacePlaceholder: 'Ersetzen durch…',
157
+ replaceAriaLabel: 'Ersetzen durch',
158
+ replaceBtn: 'Ersetzen',
159
+ replaceAllBtn: 'Alle ersetzen',
160
+ close: '×',
161
+ },
162
+
163
+ shortcutsDialog: {
164
+ title: 'Tastenkürzel',
165
+ ariaLabel: 'Tastenkürzel',
166
+ close: 'Schließen',
167
+ shortcuts: [
168
+ {
169
+ category: 'Textformatierung',
170
+ items: [
171
+ { keys: 'Ctrl + B', action: 'Fett' },
172
+ { keys: 'Ctrl + I', action: 'Kursiv' },
173
+ { keys: 'Ctrl + U', action: 'Unterstrichen' },
174
+ { keys: 'Ctrl + K', action: 'Link einfügen / bearbeiten' },
175
+ ],
176
+ },
177
+ {
178
+ category: 'Verlauf',
179
+ items: [
180
+ { keys: 'Ctrl + Z', action: 'Rückgängig' },
181
+ { keys: 'Ctrl + Y / Ctrl + Shift + Z', action: 'Wiederholen' },
182
+ ],
183
+ },
184
+ {
185
+ category: 'Auswahl & Navigation',
186
+ items: [
187
+ { keys: 'Ctrl + A', action: 'Alles auswählen' },
188
+ { keys: 'Tab', action: 'Listenebene erhöhen / Leerzeichen einfügen' },
189
+ { keys: 'Shift + Tab', action: 'Listenebene verringern' },
190
+ ],
191
+ },
192
+ {
193
+ category: 'Zwischenablage',
194
+ items: [
195
+ { keys: 'Ctrl + Shift + V', action: 'Als einfachen Text einfügen' },
196
+ ],
197
+ },
198
+ {
199
+ category: 'Suchen & Ersetzen',
200
+ items: [
201
+ { keys: 'Ctrl + F', action: 'Im Dokument suchen' },
202
+ { keys: 'Ctrl + H', action: 'Suchen & Ersetzen' },
203
+ ],
204
+ },
205
+ {
206
+ category: 'Editor',
207
+ items: [
208
+ { keys: 'Ctrl + Shift + /', action: 'Diesen Tastenkürzel-Dialog anzeigen' },
209
+ ],
210
+ },
211
+ ],
212
+ },
213
+
214
+ contextMenu: {
215
+ cut: 'Ausschneiden',
216
+ copy: 'Kopieren',
217
+ paste: 'Einfügen',
218
+ bold: 'Fett',
219
+ italic: 'Kursiv',
220
+ underline: 'Unterstrichen',
221
+ textColor: 'Textfarbe',
222
+ highlightColor: 'Hervorhebungsfarbe',
223
+ copyFormat: 'Format kopieren',
224
+ pasteFormat: 'Format einfügen',
225
+ removeFormat: 'Formatierung entfernen',
226
+ link: 'Link einfügen',
227
+ image: 'Bild einfügen',
228
+ video: 'Video einfügen',
229
+ table: 'Tabelle einfügen',
230
+ back: 'Zurück',
231
+ noHighlight: 'Keine Hervorhebung',
232
+ customColor: 'Benutzerdefinierte Farbe',
233
+ customColorLabel: 'Benutzerdefiniert…',
234
+ },
235
+
236
+ statusbar: {
237
+ resizeHandle: 'Editor-Größe ändern',
238
+ words: (n) => `Wörter: ${n}`,
239
+ wordsLimit: (n, max) => `Wörter: ${n}/${max}`,
240
+ chars: (n) => `Zeichen: ${n}`,
241
+ charsLimit: (n, max) => `Zeichen: ${n}/${max}`,
242
+ },
243
+
244
+ tooltips: {
245
+ link: {
246
+ ariaLabel: 'Link-Aktionen',
247
+ openLink: 'Link öffnen',
248
+ copyUrl: 'URL kopieren',
249
+ editLink: 'Link bearbeiten',
250
+ removeLink: 'Link entfernen',
251
+ },
252
+ image: {
253
+ ariaLabel: 'Bild-Aktionen',
254
+ label: 'Bild',
255
+ floatLeft: 'Links umfließen',
256
+ noFloat: 'Kein Umfluss',
257
+ alignCenter: 'Zentriert',
258
+ floatRight: 'Rechts umfließen',
259
+ originalSize: 'Originalgröße',
260
+ rotateLeft: 'Links drehen',
261
+ rotateRight: 'Rechts drehen',
262
+ cropImage: 'Bild zuschneiden',
263
+ addCaption: 'Beschriftung hinzufügen / bearbeiten',
264
+ deleteImage: 'Bild löschen',
265
+ },
266
+ code: {
267
+ ariaLabel: 'Codeblock-Aktionen',
268
+ label: 'Code',
269
+ syntaxLanguage: 'Syntaxsprache',
270
+ syntaxAriaLabel: 'Syntaxsprache',
271
+ copyCode: 'Code kopieren',
272
+ toggleWordWrap: 'Zeilenumbruch umschalten',
273
+ enableWordWrap: 'Zeilenumbruch aktivieren',
274
+ disableWordWrap: 'Zeilenumbruch deaktivieren',
275
+ convertToParagraph: 'In Absatz umwandeln',
276
+ deleteCodeBlock: 'Codeblock löschen',
277
+ },
278
+ table: {
279
+ ariaLabel: 'Tabellen-Aktionen',
280
+ label: 'Tabelle',
281
+ selectCells: 'Zellen auswählen',
282
+ addRowAbove: 'Zeile oben hinzufügen',
283
+ addRowBelow: 'Zeile unten hinzufügen',
284
+ deleteRow: 'Zeile löschen',
285
+ addColumnLeft: 'Spalte links hinzufügen',
286
+ addColumnRight: 'Spalte rechts hinzufügen',
287
+ deleteColumn: 'Spalte löschen',
288
+ mergeCells: 'Zellen zusammenführen',
289
+ unmergeCells: 'Zellen trennen',
290
+ columnWidth: 'Spaltenbreite',
291
+ rowHeight: 'Zeilenhöhe',
292
+ tableBorderWidth: 'Tabellenrahmenbreite',
293
+ deleteTable: 'Tabelle löschen',
294
+ columnWidthPx: 'Spaltenbreite (px)',
295
+ rowHeightPx: 'Zeilenhöhe (px)',
296
+ tableBorderWidthPx: 'Tabellenrahmenbreite (px)',
297
+ cancelBtn: 'Abbrechen',
298
+ applyBtn: 'Anwenden',
299
+ },
300
+ video: {
301
+ ariaLabel: 'Video-Aktionen',
302
+ label: 'Video',
303
+ floatLeft: 'Links umfließen',
304
+ noFloat: 'Kein Umfluss',
305
+ alignCenter: 'Zentriert',
306
+ floatRight: 'Rechts umfließen',
307
+ originalSize: 'Originalgröße',
308
+ previewVideo: 'Video-Vorschau',
309
+ exitPreview: 'Vorschau beenden',
310
+ deleteVideo: 'Video löschen',
311
+ },
312
+ },
313
+
314
+ errors: {
315
+ imageFormat: (type) =>
316
+ `Das Format „${type}" wird in Webbrowsern nicht unterstützt. Bitte konvertieren Sie es zuerst in JPEG, PNG oder WebP.`,
317
+ imageSize: (maxSize) =>
318
+ `Die Bilddatei ist zu groß. Die maximal zulässige Größe beträgt ${maxSize} MB.`,
319
+ },
320
+ };
@@ -0,0 +1,328 @@
1
+ /**
2
+ * en.js - English locale (canonical reference)
3
+ * All other locales deep-merge against this to fill missing keys.
4
+ */
5
+
6
+ /** @type {import('../../../types/index.js').AsnLocale} */
7
+ export const en = {
8
+ toolbar: {
9
+ bold: 'Bold (Ctrl+B)',
10
+ italic: 'Italic (Ctrl+I)',
11
+ underline: 'Underline (Ctrl+U)',
12
+ strikethrough: 'Strikethrough',
13
+ superscript: 'Superscript',
14
+ subscript: 'Subscript',
15
+ alignLeft: 'Align Left',
16
+ alignCenter: 'Align Center',
17
+ alignRight: 'Align Right',
18
+ alignJustify: 'Justify',
19
+ ul: 'Unordered List',
20
+ ol: 'Ordered List',
21
+ checklist: 'Checklist',
22
+ indent: 'Indent',
23
+ outdent: 'Outdent',
24
+ undo: 'Undo (Ctrl+Z)',
25
+ redo: 'Redo (Ctrl+Y)',
26
+ hr: 'Horizontal Rule',
27
+ link: 'Insert Link',
28
+ image: 'Insert Image',
29
+ video: 'Insert Video',
30
+ emoji: 'Insert Emoji',
31
+ icon: 'Insert FA Icon',
32
+ table: 'Insert Table',
33
+ fontSize: 'Font Size',
34
+ fontSizePlaceholder: 'Size',
35
+ removeFormat: 'Remove Format',
36
+ direction: 'Toggle Text Direction (LTR / RTL)',
37
+ fontFamily: 'Font Family',
38
+ paragraphStyle: 'Paragraph Style',
39
+ paragraphStylePlaceholder: 'Style',
40
+ lineHeight: 'Line Height',
41
+ lineHeightPlaceholder: '\u2195 Line',
42
+ codeview: 'HTML Code View',
43
+ fullscreen: 'Fullscreen',
44
+ shortcuts: 'Keyboard Shortcuts (Ctrl+Shift+/)',
45
+ find: 'Find (Ctrl+F)',
46
+ findReplace: 'Find & Replace (Ctrl+H)',
47
+ inlineCode: 'Inline Code (Ctrl+`)',
48
+ print: 'Print',
49
+ foreColor: 'Text Color',
50
+ backColor: 'Highlight Color',
51
+ chooseTextColor: 'Choose text color',
52
+ chooseHighlightColor: 'Choose highlight color',
53
+ customColor: 'Custom color',
54
+ insertTableLabel: 'Insert Table',
55
+ /** Map of paragraph-style value → label (only values needing translation) */
56
+ paragraphItems: {
57
+ p: 'Normal',
58
+ blockquote: 'Quote',
59
+ pre: 'Code',
60
+ },
61
+ },
62
+
63
+ linkDialog: {
64
+ ariaLabel: 'Insert link',
65
+ title: 'Insert Link',
66
+ url: 'URL',
67
+ urlPlaceholder: 'https://',
68
+ displayText: 'Display Text',
69
+ textPlaceholder: 'Link text',
70
+ openInNewTab: 'Open in new tab',
71
+ insertBtn: 'Insert',
72
+ cancelBtn: 'Cancel',
73
+ },
74
+
75
+ imageDialog: {
76
+ ariaLabel: 'Insert image',
77
+ title: 'Insert Image',
78
+ imageUrl: 'Image URL',
79
+ urlPlaceholder: 'https://example.com/image.png',
80
+ altText: 'Alt Text',
81
+ altPlaceholder: 'Describe the image',
82
+ alignment: 'Alignment',
83
+ alignNone: 'None',
84
+ alignLeft: 'Left',
85
+ alignCenter: 'Center',
86
+ alignRight: 'Right',
87
+ uploadLabel: 'Or upload a file',
88
+ insertBtn: 'Insert',
89
+ cancelBtn: 'Cancel',
90
+ },
91
+
92
+ videoDialog: {
93
+ ariaLabel: 'Insert video',
94
+ title: 'Insert Video',
95
+ videoUrl: 'Video URL',
96
+ urlPlaceholder: 'YouTube, Vimeo, or direct .mp4 URL',
97
+ widthLabel: 'Width (px)',
98
+ widthPlaceholder: '560',
99
+ insertBtn: 'Insert',
100
+ cancelBtn: 'Cancel',
101
+ /** @param {string} type */
102
+ detected: (type) => `Detected: ${type}`,
103
+ unknownFormat: 'Unknown format \u2014 will try direct video embed',
104
+ invalidUrl: 'Invalid URL \u2014 please enter a valid video link.',
105
+ },
106
+
107
+ emojiDialog: {
108
+ ariaLabel: 'Insert emoji',
109
+ title: 'Insert Emoji',
110
+ searchPlaceholder: 'Search emojis\u2026',
111
+ all: 'All',
112
+ cancelBtn: 'Cancel',
113
+ close: 'Close',
114
+ categories: {
115
+ smileys: 'Smileys',
116
+ people: 'People',
117
+ animals: 'Animals',
118
+ food: 'Food',
119
+ travel: 'Travel',
120
+ objects: 'Objects',
121
+ symbols: 'Symbols',
122
+ },
123
+ },
124
+
125
+ iconDialog: {
126
+ ariaLabel: 'Insert FA icon',
127
+ title: 'Insert FA Icon',
128
+ searchPlaceholder: 'Search icons\u2026',
129
+ all: 'All',
130
+ style: 'Style',
131
+ size: 'Size',
132
+ color: 'Color',
133
+ useColor: ' Use color',
134
+ selectHint: 'Select an icon',
135
+ insertBtn: 'Insert FA Icon',
136
+ cancelBtn: 'Cancel',
137
+ close: 'Close',
138
+ categories: {
139
+ popular: 'Popular',
140
+ interface: 'Interface',
141
+ navigation: 'Navigation',
142
+ media: 'Media',
143
+ communication: 'Communication',
144
+ files: 'Files',
145
+ people: 'People',
146
+ objects: 'Objects',
147
+ },
148
+ },
149
+
150
+ findReplace: {
151
+ findTitle: 'Find',
152
+ findReplaceTitle: 'Find & Replace',
153
+ findPlaceholder: 'Find\u2026',
154
+ searchAriaLabel: 'Search text',
155
+ caseSensitive: '\u00a0Case sensitive',
156
+ prevBtn: '\u2190 Prev',
157
+ nextBtn: 'Next \u2192',
158
+ replacePlaceholder: 'Replace with\u2026',
159
+ replaceAriaLabel: 'Replace with',
160
+ replaceBtn: 'Replace',
161
+ replaceAllBtn: 'Replace All',
162
+ close: '\u00d7',
163
+ },
164
+
165
+ shortcutsDialog: {
166
+ title: 'Keyboard Shortcuts',
167
+ ariaLabel: 'Keyboard Shortcuts',
168
+ close: 'Close',
169
+ shortcuts: [
170
+ {
171
+ category: 'Text Formatting',
172
+ items: [
173
+ { keys: 'Ctrl + B', action: 'Bold' },
174
+ { keys: 'Ctrl + I', action: 'Italic' },
175
+ { keys: 'Ctrl + U', action: 'Underline' },
176
+ { keys: 'Ctrl + K', action: 'Insert / edit link' },
177
+ ],
178
+ },
179
+ {
180
+ category: 'History',
181
+ items: [
182
+ { keys: 'Ctrl + Z', action: 'Undo' },
183
+ { keys: 'Ctrl + Y / Ctrl + Shift + Z', action: 'Redo' },
184
+ ],
185
+ },
186
+ {
187
+ category: 'Selection & Navigation',
188
+ items: [
189
+ { keys: 'Ctrl + A', action: 'Select all content' },
190
+ { keys: 'Tab', action: 'Indent list item / insert spaces' },
191
+ { keys: 'Shift + Tab', action: 'Outdent list item' },
192
+ ],
193
+ },
194
+ {
195
+ category: 'Clipboard',
196
+ items: [
197
+ { keys: 'Ctrl + Shift + V', action: 'Paste as plain text' },
198
+ ],
199
+ },
200
+ {
201
+ category: 'Find & Replace',
202
+ items: [
203
+ { keys: 'Ctrl + F', action: 'Find in document' },
204
+ { keys: 'Ctrl + H', action: 'Find & Replace' },
205
+ ],
206
+ },
207
+ {
208
+ category: 'Editor',
209
+ items: [
210
+ { keys: 'Ctrl + Shift + /', action: 'Show this keyboard shortcuts dialog' },
211
+ ],
212
+ },
213
+ ],
214
+ },
215
+
216
+ contextMenu: {
217
+ cut: 'Cut',
218
+ copy: 'Copy',
219
+ paste: 'Paste',
220
+ bold: 'Bold',
221
+ italic: 'Italic',
222
+ underline: 'Underline',
223
+ textColor: 'Text Color',
224
+ highlightColor: 'Highlight Color',
225
+ copyFormat: 'Copy Format',
226
+ pasteFormat: 'Paste Format',
227
+ removeFormat: 'Remove Format',
228
+ link: 'Insert Link',
229
+ image: 'Insert Image',
230
+ video: 'Insert Video',
231
+ table: 'Insert Table',
232
+ back: 'Back',
233
+ noHighlight: 'No highlight',
234
+ customColor: 'Custom color',
235
+ customColorLabel: 'Custom\u2026',
236
+ },
237
+
238
+ statusbar: {
239
+ resizeHandle: 'Resize editor',
240
+ /** @param {number} n */
241
+ words: (n) => `Words: ${n}`,
242
+ /** @param {number} n @param {number} max */
243
+ wordsLimit: (n, max) => `Words: ${n}/${max}`,
244
+ /** @param {number} n */
245
+ chars: (n) => `Chars: ${n}`,
246
+ /** @param {number} n @param {number} max */
247
+ charsLimit: (n, max) => `Chars: ${n}/${max}`,
248
+ },
249
+
250
+ tooltips: {
251
+ link: {
252
+ ariaLabel: 'Link actions',
253
+ openLink: 'Open link',
254
+ copyUrl: 'Copy URL',
255
+ editLink: 'Edit link',
256
+ removeLink: 'Remove link',
257
+ },
258
+ image: {
259
+ ariaLabel: 'Image actions',
260
+ label: 'Image',
261
+ floatLeft: 'Float Left',
262
+ noFloat: 'No Float',
263
+ alignCenter: 'Align Center',
264
+ floatRight: 'Float Right',
265
+ originalSize: 'Original Size',
266
+ rotateLeft: 'Rotate Left',
267
+ rotateRight: 'Rotate Right',
268
+ cropImage: 'Crop Image',
269
+ addCaption: 'Add / Edit Caption',
270
+ deleteImage: 'Delete Image',
271
+ },
272
+ code: {
273
+ ariaLabel: 'Code block actions',
274
+ label: 'Code',
275
+ syntaxLanguage: 'Syntax Language',
276
+ syntaxAriaLabel: 'Syntax language',
277
+ copyCode: 'Copy Code',
278
+ toggleWordWrap: 'Toggle Word Wrap',
279
+ enableWordWrap: 'Enable Word Wrap',
280
+ disableWordWrap: 'Disable Word Wrap',
281
+ convertToParagraph: 'Convert to Paragraph',
282
+ deleteCodeBlock: 'Delete Code Block',
283
+ },
284
+ table: {
285
+ ariaLabel: 'Table actions',
286
+ label: 'Table',
287
+ selectCells: 'Select Cells',
288
+ addRowAbove: 'Add Row Above',
289
+ addRowBelow: 'Add Row Below',
290
+ deleteRow: 'Delete Row',
291
+ addColumnLeft: 'Add Column Left',
292
+ addColumnRight: 'Add Column Right',
293
+ deleteColumn: 'Delete Column',
294
+ mergeCells: 'Merge Cells',
295
+ unmergeCells: 'Unmerge Cells',
296
+ columnWidth: 'Column Width',
297
+ rowHeight: 'Row Height',
298
+ tableBorderWidth: 'Table Border Width',
299
+ deleteTable: 'Delete Table',
300
+ columnWidthPx: 'Column Width (px)',
301
+ rowHeightPx: 'Row Height (px)',
302
+ tableBorderWidthPx: 'Table Border Width (px)',
303
+ cancelBtn: 'Cancel',
304
+ applyBtn: 'Apply',
305
+ },
306
+ video: {
307
+ ariaLabel: 'Video actions',
308
+ label: 'Video',
309
+ floatLeft: 'Float Left',
310
+ noFloat: 'No Float',
311
+ alignCenter: 'Align Center',
312
+ floatRight: 'Float Right',
313
+ originalSize: 'Original Size',
314
+ previewVideo: 'Preview Video',
315
+ exitPreview: 'Exit Preview',
316
+ deleteVideo: 'Delete Video',
317
+ },
318
+ },
319
+
320
+ errors: {
321
+ /** @param {string} type */
322
+ imageFormat: (type) =>
323
+ `Format "${type}" is not supported for display in web browsers. Please convert to JPEG, PNG, or WebP first.`,
324
+ /** @param {number} maxSize */
325
+ imageSize: (maxSize) =>
326
+ `Image file is too large. Maximum allowed size is ${maxSize} MB.`,
327
+ },
328
+ };