@ckeditor/ckeditor5-code-block 38.2.0-alpha.1 → 39.0.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.
- package/README.md +0 -1
- package/build/translations/sq.js +1 -0
- package/lang/translations/sq.po +25 -0
- package/package.json +2 -3
- package/src/augmentation.d.ts +1 -1
- package/src/codeblock.d.ts +3 -3
- package/src/codeblock.js +3 -3
- package/src/codeblockcommand.d.ts +1 -1
- package/src/codeblockcommand.js +3 -3
- package/src/codeblockediting.d.ts +2 -2
- package/src/codeblockediting.js +8 -8
- package/src/codeblockui.d.ts +1 -1
- package/src/codeblockui.js +4 -4
- package/src/converters.d.ts +3 -3
- package/src/converters.js +1 -1
- package/src/indentcodeblockcommand.d.ts +1 -1
- package/src/indentcodeblockcommand.js +2 -2
- package/src/index.d.ts +8 -8
- package/src/index.js +4 -4
- package/src/outdentcodeblockcommand.d.ts +1 -1
- package/src/outdentcodeblockcommand.js +2 -2
- package/src/utils.d.ts +3 -3
- package/src/utils.js +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@ CKEditor 5 code block feature
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-code-block)
|
|
5
5
|
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
|
6
6
|
[](https://app.travis-ci.com/github/ckeditor/ckeditor5)
|
|
7
|
-

|
|
8
7
|
|
|
9
8
|
This package implements the code block feature for CKEditor 5.
|
|
10
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){const i=t.sq=t.sq||{};i.dictionary=Object.assign(i.dictionary||{},{"Insert code block":"Shto bllokun e kodit","Plain text":"Teksti i thjeshtë"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Albanian (https://app.transifex.com/ckeditor/teams/11143/sq/)\n"
|
|
16
|
+
"Language: sq\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
20
|
+
msgid "Insert code block"
|
|
21
|
+
msgstr "Shto bllokun e kodit"
|
|
22
|
+
|
|
23
|
+
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
24
|
+
msgid "Plain text"
|
|
25
|
+
msgstr "Teksti i thjeshtë"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-code-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "39.0.1",
|
|
4
4
|
"description": "Code block feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
"ckeditor5-dll"
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
|
-
"type": "module",
|
|
15
14
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "
|
|
15
|
+
"ckeditor5": "39.0.1"
|
|
17
16
|
},
|
|
18
17
|
"engines": {
|
|
19
18
|
"node": ">=16.0.0",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { CodeBlock, CodeBlockCommand, CodeBlockConfig, CodeBlockEditing, CodeBlockUI, IndentCodeBlockCommand, OutdentCodeBlockCommand } from './index
|
|
5
|
+
import type { CodeBlock, CodeBlockCommand, CodeBlockConfig, CodeBlockEditing, CodeBlockUI, IndentCodeBlockCommand, OutdentCodeBlockCommand } from './index';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
package/src/codeblock.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/codeblock
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
9
|
-
import CodeBlockEditing from './codeblockediting
|
|
10
|
-
import CodeBlockUI from './codeblockui
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import CodeBlockEditing from './codeblockediting';
|
|
10
|
+
import CodeBlockUI from './codeblockui';
|
|
11
11
|
/**
|
|
12
12
|
* The code block plugin.
|
|
13
13
|
*
|
package/src/codeblock.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/codeblock
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
9
|
-
import CodeBlockEditing from './codeblockediting
|
|
10
|
-
import CodeBlockUI from './codeblockui
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import CodeBlockEditing from './codeblockediting';
|
|
10
|
+
import CodeBlockUI from './codeblockui';
|
|
11
11
|
/**
|
|
12
12
|
* The code block plugin.
|
|
13
13
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Command, type Editor } from 'ckeditor5/src/core
|
|
5
|
+
import { Command, type Editor } from 'ckeditor5/src/core';
|
|
6
6
|
/**
|
|
7
7
|
* The code block command plugin.
|
|
8
8
|
*/
|
package/src/codeblockcommand.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Command } from 'ckeditor5/src/core
|
|
6
|
-
import { first } from 'ckeditor5/src/utils
|
|
7
|
-
import { getNormalizedAndLocalizedLanguageDefinitions, canBeCodeBlock } from './utils
|
|
5
|
+
import { Command } from 'ckeditor5/src/core';
|
|
6
|
+
import { first } from 'ckeditor5/src/utils';
|
|
7
|
+
import { getNormalizedAndLocalizedLanguageDefinitions, canBeCodeBlock } from './utils';
|
|
8
8
|
/**
|
|
9
9
|
* The code block command plugin.
|
|
10
10
|
*/
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/codeblockediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core
|
|
9
|
-
import { ShiftEnter } from 'ckeditor5/src/enter
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
+
import { ShiftEnter } from 'ckeditor5/src/enter';
|
|
10
10
|
/**
|
|
11
11
|
* The editing part of the code block feature.
|
|
12
12
|
*
|
package/src/codeblockediting.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/codeblockediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
9
|
-
import { ShiftEnter } from 'ckeditor5/src/enter
|
|
10
|
-
import { UpcastWriter } from 'ckeditor5/src/engine
|
|
11
|
-
import CodeBlockCommand from './codeblockcommand
|
|
12
|
-
import IndentCodeBlockCommand from './indentcodeblockcommand
|
|
13
|
-
import OutdentCodeBlockCommand from './outdentcodeblockcommand
|
|
14
|
-
import { getNormalizedAndLocalizedLanguageDefinitions, getLeadingWhiteSpaces, rawSnippetTextToViewDocumentFragment } from './utils
|
|
15
|
-
import { modelToViewCodeBlockInsertion, modelToDataViewSoftBreakInsertion, dataViewToModelCodeBlockInsertion, dataViewToModelTextNewlinesInsertion, dataViewToModelOrphanNodeConsumer } from './converters
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import { ShiftEnter } from 'ckeditor5/src/enter';
|
|
10
|
+
import { UpcastWriter } from 'ckeditor5/src/engine';
|
|
11
|
+
import CodeBlockCommand from './codeblockcommand';
|
|
12
|
+
import IndentCodeBlockCommand from './indentcodeblockcommand';
|
|
13
|
+
import OutdentCodeBlockCommand from './outdentcodeblockcommand';
|
|
14
|
+
import { getNormalizedAndLocalizedLanguageDefinitions, getLeadingWhiteSpaces, rawSnippetTextToViewDocumentFragment } from './utils';
|
|
15
|
+
import { modelToViewCodeBlockInsertion, modelToDataViewSoftBreakInsertion, dataViewToModelCodeBlockInsertion, dataViewToModelTextNewlinesInsertion, dataViewToModelOrphanNodeConsumer } from './converters';
|
|
16
16
|
const DEFAULT_ELEMENT = 'paragraph';
|
|
17
17
|
/**
|
|
18
18
|
* The editing part of the code block feature.
|
package/src/codeblockui.d.ts
CHANGED
package/src/codeblockui.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/codeblockui
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
9
|
-
import { Collection } from 'ckeditor5/src/utils
|
|
10
|
-
import { Model, SplitButtonView, createDropdown, addListToDropdown } from 'ckeditor5/src/ui
|
|
11
|
-
import { getNormalizedAndLocalizedLanguageDefinitions } from './utils
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import { Collection } from 'ckeditor5/src/utils';
|
|
10
|
+
import { Model, SplitButtonView, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
|
|
11
|
+
import { getNormalizedAndLocalizedLanguageDefinitions } from './utils';
|
|
12
12
|
import codeBlockIcon from '../theme/icons/codeblock.svg';
|
|
13
13
|
import '../theme/codeblock.css';
|
|
14
14
|
/**
|
package/src/converters.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/converters
|
|
7
7
|
*/
|
|
8
|
-
import type { GetCallback } from 'ckeditor5/src/utils
|
|
9
|
-
import type { DowncastInsertEvent, Model, UpcastElementEvent, UpcastTextEvent, View } from 'ckeditor5/src/engine
|
|
10
|
-
import type { CodeBlockLanguageDefinition } from './codeblockconfig
|
|
8
|
+
import type { GetCallback } from 'ckeditor5/src/utils';
|
|
9
|
+
import type { DowncastInsertEvent, Model, UpcastElementEvent, UpcastTextEvent, View } from 'ckeditor5/src/engine';
|
|
10
|
+
import type { CodeBlockLanguageDefinition } from './codeblockconfig';
|
|
11
11
|
/**
|
|
12
12
|
* A model-to-view (both editing and data) converter for the `codeBlock` element.
|
|
13
13
|
*
|
package/src/converters.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { getPropertyAssociation } from './utils
|
|
5
|
+
import { getPropertyAssociation } from './utils';
|
|
6
6
|
/**
|
|
7
7
|
* A model-to-view (both editing and data) converter for the `codeBlock` element.
|
|
8
8
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/indentcodeblockcommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from 'ckeditor5/src/core
|
|
9
|
-
import { getIndentOutdentPositions, isModelSelectionInCodeBlock } from './utils
|
|
8
|
+
import { Command } from 'ckeditor5/src/core';
|
|
9
|
+
import { getIndentOutdentPositions, isModelSelectionInCodeBlock } from './utils';
|
|
10
10
|
/**
|
|
11
11
|
* The code block indentation increase command plugin.
|
|
12
12
|
*/
|
package/src/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block
|
|
7
7
|
*/
|
|
8
|
-
export { default as CodeBlock } from './codeblock
|
|
9
|
-
export { default as CodeBlockEditing } from './codeblockediting
|
|
10
|
-
export { default as CodeBlockUI } from './codeblockui
|
|
11
|
-
export type { default as CodeBlockCommand } from './codeblockcommand
|
|
12
|
-
export type { default as IndentCodeBlockCommand } from './indentcodeblockcommand
|
|
13
|
-
export type { default as OutdentCodeBlockCommand } from './outdentcodeblockcommand
|
|
14
|
-
export type { CodeBlockConfig } from './codeblockconfig
|
|
15
|
-
import './augmentation
|
|
8
|
+
export { default as CodeBlock } from './codeblock';
|
|
9
|
+
export { default as CodeBlockEditing } from './codeblockediting';
|
|
10
|
+
export { default as CodeBlockUI } from './codeblockui';
|
|
11
|
+
export type { default as CodeBlockCommand } from './codeblockcommand';
|
|
12
|
+
export type { default as IndentCodeBlockCommand } from './indentcodeblockcommand';
|
|
13
|
+
export type { default as OutdentCodeBlockCommand } from './outdentcodeblockcommand';
|
|
14
|
+
export type { CodeBlockConfig } from './codeblockconfig';
|
|
15
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block
|
|
7
7
|
*/
|
|
8
|
-
export { default as CodeBlock } from './codeblock
|
|
9
|
-
export { default as CodeBlockEditing } from './codeblockediting
|
|
10
|
-
export { default as CodeBlockUI } from './codeblockui
|
|
11
|
-
import './augmentation
|
|
8
|
+
export { default as CodeBlock } from './codeblock';
|
|
9
|
+
export { default as CodeBlockEditing } from './codeblockediting';
|
|
10
|
+
export { default as CodeBlockUI } from './codeblockui';
|
|
11
|
+
import './augmentation';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Command, type Editor } from 'ckeditor5/src/core
|
|
5
|
+
import { Command, type Editor } from 'ckeditor5/src/core';
|
|
6
6
|
/**
|
|
7
7
|
* The code block indentation decrease command plugin.
|
|
8
8
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Command } from 'ckeditor5/src/core
|
|
6
|
-
import { getLeadingWhiteSpaces, getIndentOutdentPositions, isModelSelectionInCodeBlock } from './utils
|
|
5
|
+
import { Command } from 'ckeditor5/src/core';
|
|
6
|
+
import { getLeadingWhiteSpaces, getIndentOutdentPositions, isModelSelectionInCodeBlock } from './utils';
|
|
7
7
|
/**
|
|
8
8
|
* The code block indentation decrease command plugin.
|
|
9
9
|
*/
|
package/src/utils.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module code-block/utils
|
|
7
7
|
*/
|
|
8
|
-
import type { Editor } from 'ckeditor5/src/core
|
|
9
|
-
import type { CodeBlockLanguageDefinition } from './codeblockconfig
|
|
10
|
-
import type { DocumentSelection, Element, Model, Position, Schema, Text, UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine
|
|
8
|
+
import type { Editor } from 'ckeditor5/src/core';
|
|
9
|
+
import type { CodeBlockLanguageDefinition } from './codeblockconfig';
|
|
10
|
+
import type { DocumentSelection, Element, Model, Position, Schema, Text, UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine';
|
|
11
11
|
/**
|
|
12
12
|
* Returns code block languages as defined in `config.codeBlock.languages` but processed:
|
|
13
13
|
*
|
package/src/utils.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { first } from 'ckeditor5/src/utils
|
|
5
|
+
import { first } from 'ckeditor5/src/utils';
|
|
6
6
|
/**
|
|
7
7
|
* Returns code block languages as defined in `config.codeBlock.languages` but processed:
|
|
8
8
|
*
|