-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
augmentation.ts
58 lines (53 loc) · 2.01 KB
/
augmentation.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
import type {
TextPartLanguageOption,
TextPartLanguage,
TextPartLanguageEditing,
TextPartLanguageUI,
TextPartLanguageCommand
} from './index.js';
declare module '@ckeditor/ckeditor5-core' {
interface LanguageConfig {
/**
* The available {@link module:language/textpartlanguage~TextPartLanguage}
* options that allow setting the language of parts of the content.
*
* This configuration option is available only with the {@glink api/language text part language feature} enabled.
*
* Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
* to learn more.
*
* To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
*
* The default value is:
*
* ```ts
* const config = [
* { title: 'Arabic', languageCode: 'ar' },
* { title: 'French', languageCode: 'fr' },
* { title: 'Spanish', languageCode: 'es' }
* ];
* ```
*
* The `title` property will be used by the text part language dropdown to render available options.
*
* The `languageCode` property is used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
*
* You can also specify the optional `textDirection` property indicating the reading direction of the language.
* Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
* specify the text direction by itself.
*/
textPartLanguage?: Array<TextPartLanguageOption>;
}
interface PluginsMap {
[ TextPartLanguage.pluginName ]: TextPartLanguage;
[ TextPartLanguageEditing.pluginName ]: TextPartLanguageEditing;
[ TextPartLanguageUI.pluginName ]: TextPartLanguageUI;
}
interface CommandsMap {
textPartLanguage: TextPartLanguageCommand;
}
}