@ckeditor/ckeditor5-language 37.0.0-alpha.0 → 37.0.0-alpha.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/package.json +10 -10
- package/src/augmentation.d.ts +46 -0
- package/src/augmentation.js +5 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +1 -0
- package/src/textpartlanguage.d.ts +0 -5
- package/src/textpartlanguagecommand.d.ts +0 -5
- package/src/textpartlanguageconfig.d.ts +0 -34
- package/src/textpartlanguageediting.d.ts +0 -1
- package/src/textpartlanguageediting.js +0 -1
- package/src/textpartlanguageui.d.ts +0 -6
- package/src/textpartlanguageui.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-language",
|
|
3
|
-
"version": "37.0.0-alpha.
|
|
3
|
+
"version": "37.0.0-alpha.2",
|
|
4
4
|
"description": "Text part language feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^37.0.0-alpha.
|
|
15
|
+
"ckeditor5": "^37.0.0-alpha.2"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.
|
|
19
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
20
|
-
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.
|
|
21
|
-
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.
|
|
22
|
-
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.
|
|
23
|
-
"@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.
|
|
24
|
-
"@ckeditor/ckeditor5-ui": "^37.0.0-alpha.
|
|
18
|
+
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.2",
|
|
19
|
+
"@ckeditor/ckeditor5-dev-utils": "^35.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.2",
|
|
21
|
+
"@ckeditor/ckeditor5-engine": "^37.0.0-alpha.2",
|
|
22
|
+
"@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.2",
|
|
23
|
+
"@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.2",
|
|
24
|
+
"@ckeditor/ckeditor5-ui": "^37.0.0-alpha.2",
|
|
25
25
|
"typescript": "^4.8.4",
|
|
26
26
|
"webpack": "^5.58.1",
|
|
27
27
|
"webpack-cli": "^4.9.0"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"scripts": {
|
|
52
52
|
"dll:build": "webpack",
|
|
53
|
-
"build": "tsc -p ./tsconfig.
|
|
53
|
+
"build": "tsc -p ./tsconfig.json",
|
|
54
54
|
"postversion": "npm run build"
|
|
55
55
|
},
|
|
56
56
|
"types": "src/index.d.ts"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { TextPartLanguageOption, TextPartLanguage, TextPartLanguageUI, TextPartLanguageCommand } from './index';
|
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
+
interface LanguageConfig {
|
|
8
|
+
/**
|
|
9
|
+
* The available {@link module:language/textpartlanguage~TextPartLanguage}
|
|
10
|
+
* options that allow setting the language of parts of the content.
|
|
11
|
+
*
|
|
12
|
+
* This configuration option is available only with the {@glink api/language text part language feature} enabled.
|
|
13
|
+
*
|
|
14
|
+
* Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
|
|
15
|
+
* to learn more.
|
|
16
|
+
*
|
|
17
|
+
* To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
|
|
18
|
+
*
|
|
19
|
+
* The default value is:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* const config = [
|
|
23
|
+
* { title: 'Arabic', languageCode: 'ar' },
|
|
24
|
+
* { title: 'French', languageCode: 'fr' },
|
|
25
|
+
* { title: 'Spanish', languageCode: 'es' }
|
|
26
|
+
* ];
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* The `title` property will be used by the text part language dropdown to render available options.
|
|
30
|
+
*
|
|
31
|
+
* The `languageCode` property is used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
|
|
32
|
+
*
|
|
33
|
+
* You can also specify the optional `textDirection` property indicating the reading direction of the language.
|
|
34
|
+
* Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
|
|
35
|
+
* specify the text direction by itself.
|
|
36
|
+
*/
|
|
37
|
+
textPartLanguage?: Array<TextPartLanguageOption>;
|
|
38
|
+
}
|
|
39
|
+
interface PluginsMap {
|
|
40
|
+
[TextPartLanguage.pluginName]: TextPartLanguage;
|
|
41
|
+
[TextPartLanguageUI.pluginName]: TextPartLanguageUI;
|
|
42
|
+
}
|
|
43
|
+
interface CommandsMap {
|
|
44
|
+
textPartLanguage: TextPartLanguageCommand;
|
|
45
|
+
}
|
|
46
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -8,3 +8,6 @@
|
|
|
8
8
|
export { default as TextPartLanguage } from './textpartlanguage';
|
|
9
9
|
export { default as TextPartLanguageEditing } from './textpartlanguageediting';
|
|
10
10
|
export { default as TextPartLanguageUI } from './textpartlanguageui';
|
|
11
|
+
export type { TextPartLanguageOption } from './textpartlanguageconfig';
|
|
12
|
+
export type { default as TextPartLanguageCommand } from './textpartlanguagecommand';
|
|
13
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -23,37 +23,3 @@ export interface TextPartLanguageOption {
|
|
|
23
23
|
*/
|
|
24
24
|
textDirection?: LanguageDirection;
|
|
25
25
|
}
|
|
26
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
27
|
-
interface LanguageConfig {
|
|
28
|
-
/**
|
|
29
|
-
* The available {@link module:language/textpartlanguage~TextPartLanguage}
|
|
30
|
-
* options that allow setting the language of parts of the content.
|
|
31
|
-
*
|
|
32
|
-
* This configuration option is available only with the {@glink api/language text part language feature} enabled.
|
|
33
|
-
*
|
|
34
|
-
* Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
|
|
35
|
-
* to learn more.
|
|
36
|
-
*
|
|
37
|
-
* To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
|
|
38
|
-
*
|
|
39
|
-
* The default value is:
|
|
40
|
-
*
|
|
41
|
-
* ```ts
|
|
42
|
-
* const config = [
|
|
43
|
-
* { title: 'Arabic', languageCode: 'ar' },
|
|
44
|
-
* { title: 'French', languageCode: 'fr' },
|
|
45
|
-
* { title: 'Spanish', languageCode: 'es' }
|
|
46
|
-
* ];
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* The `title` property will be used by the text part language dropdown to render available options.
|
|
50
|
-
*
|
|
51
|
-
* The `languageCode` property is used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
|
|
52
|
-
*
|
|
53
|
-
* You can also specify the optional `textDirection` property indicating the reading direction of the language.
|
|
54
|
-
* Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
|
|
55
|
-
* specify the text direction by itself.
|
|
56
|
-
*/
|
|
57
|
-
textPartLanguage?: Array<TextPartLanguageOption>;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { Plugin } from 'ckeditor5/src/core';
|
|
6
6
|
import TextPartLanguageCommand from './textpartlanguagecommand';
|
|
7
7
|
import { stringifyLanguageAttribute, parseLanguageAttribute } from './utils';
|
|
8
|
-
import './textpartlanguageconfig';
|
|
9
8
|
/**
|
|
10
9
|
* The text part language editing.
|
|
11
10
|
*
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* @module language/textpartlanguageui
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import './textpartlanguageconfig';
|
|
10
9
|
import '../theme/language.css';
|
|
11
10
|
/**
|
|
12
11
|
* The text part language UI plugin.
|
|
@@ -23,8 +22,3 @@ export default class TextPartLanguageUI extends Plugin {
|
|
|
23
22
|
*/
|
|
24
23
|
init(): void;
|
|
25
24
|
}
|
|
26
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
27
|
-
interface PluginsMap {
|
|
28
|
-
[TextPartLanguageUI.pluginName]: TextPartLanguageUI;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -9,7 +9,6 @@ import { Plugin } from 'ckeditor5/src/core';
|
|
|
9
9
|
import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
|
|
10
10
|
import { Collection } from 'ckeditor5/src/utils';
|
|
11
11
|
import { stringifyLanguageAttribute } from './utils';
|
|
12
|
-
import './textpartlanguageconfig';
|
|
13
12
|
import '../theme/language.css';
|
|
14
13
|
/**
|
|
15
14
|
* The text part language UI plugin.
|