Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-language

Package Overview
Dependencies
Maintainers
1
Versions
583
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-language - npm Package Compare versions

Comparing version 27.0.0 to 27.1.0

build/language.js

2

LICENSE.md
Software License Agreement
==========================
**CKEditor 5 Language feature** – https://github.com/ckeditor/ckeditor5-language <br>
**CKEditor 5 Text part language feature** – https://github.com/ckeditor/ckeditor5-language <br>
Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.

@@ -6,0 +6,0 @@

{
"name": "@ckeditor/ckeditor5-language",
"version": "27.0.0",
"description": "Language feature for CKEditor 5.",
"version": "27.1.0",
"description": "Text part language feature for CKEditor 5.",
"keywords": [

@@ -14,12 +14,12 @@ "ckeditor",

"dependencies": {
"ckeditor5": "^27.0.0"
"ckeditor5": "^27.1.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-core": "^27.0.0",
"@ckeditor/ckeditor5-core": "^27.1.0",
"@ckeditor/ckeditor5-dev-utils": "^24.0.0",
"@ckeditor/ckeditor5-editor-classic": "^27.0.0",
"@ckeditor/ckeditor5-engine": "^27.0.0",
"@ckeditor/ckeditor5-paragraph": "^27.0.0",
"@ckeditor/ckeditor5-theme-lark": "^27.0.0",
"@ckeditor/ckeditor5-ui": "^27.0.0",
"@ckeditor/ckeditor5-editor-classic": "^27.1.0",
"@ckeditor/ckeditor5-engine": "^27.1.0",
"@ckeditor/ckeditor5-paragraph": "^27.1.0",
"@ckeditor/ckeditor5-theme-lark": "^27.1.0",
"@ckeditor/ckeditor5-ui": "^27.1.0",
"webpack": "^4.43.0",

@@ -26,0 +26,0 @@ "webpack-cli": "^3.3.11"

@@ -1,2 +0,2 @@

CKEditor 5 language feature
CKEditor 5 text part language feature
========================================

@@ -8,7 +8,11 @@

This package implements language support for CKEditor 5.
This package implements text part language support for CKEditor 5 that allows you to define the language for each passage of content written in multiple languages. It helps satisfy the [WCAG Success Criterion 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html).
## Demo
Check out the [demo in the Text part language feature](https://ckeditor.com/docs/ckeditor5/latest/features/language.html#demo) guide.
## Documentation
See the [`@ckeditor/ckeditor5-language` package](https://ckeditor.com/docs/ckeditor5/latest/api/language.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
See the [`@ckeditor/ckeditor5-language` package](https://ckeditor.com/docs/ckeditor5/latest/api/language.html) page as well as the [Text part language feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/language.html) in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).

@@ -15,0 +19,0 @@ ## License

@@ -18,12 +18,13 @@ /**

*
* This feature allows setting a language of the editor's text part to support
* This feature allows setting a language of the document's text part to support
* [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification.
*
* To change UI editor language, refer to {@glink features/ui-language setting the UI language} guide.
* To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
*
* For more information about this feature check the {@glink api/language package page}.
* For more information about this feature, check the {@glink api/language package page} as well as the {@glink features/language
* Text part language} feature guide.
*
* This is a "glue" plugin which loads the
* {@link module:language/textpartlanguageediting~TextPartLanguageEditing text part editing feature}
* and {@link module:language/textpartlanguageui~TextPartLanguageUI text part language UI feature}.
* {@link module:language/textpartlanguageediting~TextPartLanguageEditing text part language editing feature}
* and the {@link module:language/textpartlanguageui~TextPartLanguageUI text part language UI feature}.
*

@@ -50,5 +51,5 @@ * @extends module:core/plugin~Plugin

* The available {@link module:language/textpartlanguage~TextPartLanguage}
* options allowing setting language of parts of the content.
* options that allow setting the language of parts of the content.
*
* This configuration option is available only with {@glink api/language language feature} enabled.
* This configuration option is available only with the {@glink api/language text part language feature} enabled.
*

@@ -58,3 +59,3 @@ * Refer to [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification

*
* To change UI editor language, refer to {@glink features/ui-language setting the UI language} guide.
* To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
*

@@ -71,7 +72,7 @@ * The default value is:

*
* The `languageCode` property is used for the lang attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
* The `languageCode` property is used for the `lang` attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
*
* You can also specify optional `textDirection` property indicating the reading direction of the language.
* Correct values are `ltr` and `rtl`. When `textDirection` property is missing, the text part language feature will
* specify text direction by itself.
* 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.
*

@@ -83,8 +84,8 @@ * @member {Array.<module:language/textpartlanguage~TextPartLanguageOption>}

/**
* Text part language feature option descriptor.
* The text part language feature option descriptor.
*
* @typedef {Object} module:language/textpartlanguage~TextPartLanguageOption
* @property {String} title The user-readable title of the option.
* @property {String} languageCode The language code in ISO 639 format.
* @property {String} languageCode The language code in the ISO 639 format.
* @property {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.
*/

@@ -20,3 +20,3 @@ /**

/**
* If the selection starts in a language attribute the value is set to
* If the selection starts in a language attribute, the value is set to
* the value of that language in a format:

@@ -26,6 +26,7 @@ *

*
* * `languageCode` - The language code used for the lang attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
* * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)
* format.
* * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
*
* See {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language config}
* See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}
* for more information about language properties.

@@ -54,4 +55,4 @@ *

*
* If `languageCode` is set to `false` or `null` value, it will remove attributes. Otherwise, it will set
* attribute in `{@link #value value}` format.
* If `languageCode` is set to `false` or a `null` value, it will remove attributes. Otherwise, it will set
* the attribute in the `{@link #value value}` format.
*

@@ -69,4 +70,4 @@ * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:

* @param {Object} [options] Command options.
* @param {String|Boolean} [options.languageCode] Language code to be applied to the model.
* @param {String} [options.textDirection] Language text direction.
* @param {String|Boolean} [options.languageCode] The language code to be applied to the model.
* @param {String} [options.textDirection] The language text direction.
*/

@@ -103,3 +104,3 @@ execute( { languageCode, textDirection } = {} ) {

* Returns the attribute value of the first node in the selection that allows the attribute.
* For the collapsed selection returns the selection attribute.
* For a collapsed selection it returns the selection attribute.
*

@@ -106,0 +107,0 @@ * @private

@@ -13,16 +13,16 @@ /**

/**
* Returns language attribute value in a human-readable text format:
* Returns the language attribute value in a human-readable text format:
*
* <languageCode>:<textDirection>
*
* * `languageCode` - The language code used for the lang attribute in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
* * `languageCode` - The language code used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
* * `textDirection` - One of the following values: `rtl` or `ltr`, indicating the reading direction of the language.
*
* See {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part config}
* See the {@link module:core/editor/editorconfig~LanguageConfig#textPartLanguage text part language configuration}
* for more information about language properties.
*
* If `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.
* If the `textDirection` argument is omitted, it will be automatically detected based on `languageCode`.
*
* @param {String} languageCode The language code in ISO 639-1 format.
* @param {'ltr'|'rtl'} [textDirection] Language text direction. Automatically detected if omitted.
* @param {String} languageCode The language code in the ISO 639-1 format.
* @param {'ltr'|'rtl'} [textDirection] The language text direction. Automatically detected if omitted.
* @returns {String}

@@ -36,9 +36,9 @@ */

/**
* Retrieves language properties converted to attribute value by
* Retrieves language properties converted to attribute value by the
* {@link module:language/utils~stringifyLanguageAttribute stringifyLanguageAttribute} function.
*
* @param {String} str Attribute value.
* @param {String} str The attribute value.
* @returns {Object} result
* @returns {String} result.languageCode The language code in ISO 639 format.
* @returns {String} result.textDirection Language text direction.
* @returns {String} result.languageCode The language code in the ISO 639 format.
* @returns {String} result.textDirection The language text direction.
*/

@@ -45,0 +45,0 @@ export function parseLanguageAttribute( str ) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc