@ckeditor/ckeditor5-block-quote 39.0.1 → 40.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1 -1
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/build/block-quote.js.map +1 -0
- package/lang/translations/af.po +1 -0
- package/lang/translations/ar.po +1 -0
- package/lang/translations/az.po +1 -0
- package/lang/translations/bg.po +1 -0
- package/lang/translations/bn.po +1 -0
- package/lang/translations/bs.po +1 -0
- package/lang/translations/ca.po +1 -0
- package/lang/translations/cs.po +1 -0
- package/lang/translations/da.po +1 -0
- package/lang/translations/de-ch.po +1 -0
- package/lang/translations/de.po +1 -0
- package/lang/translations/el.po +1 -0
- package/lang/translations/en-au.po +1 -0
- package/lang/translations/en-gb.po +1 -0
- package/lang/translations/en.po +1 -0
- package/lang/translations/es-co.po +1 -0
- package/lang/translations/es.po +1 -0
- package/lang/translations/et.po +1 -0
- package/lang/translations/eu.po +1 -0
- package/lang/translations/fa.po +1 -0
- package/lang/translations/fi.po +1 -0
- package/lang/translations/fr.po +1 -0
- package/lang/translations/gl.po +1 -0
- package/lang/translations/gu.po +1 -0
- package/lang/translations/he.po +1 -0
- package/lang/translations/hi.po +1 -0
- package/lang/translations/hr.po +1 -0
- package/lang/translations/hu.po +1 -0
- package/lang/translations/id.po +1 -0
- package/lang/translations/it.po +1 -0
- package/lang/translations/ja.po +1 -0
- package/lang/translations/km.po +1 -0
- package/lang/translations/kn.po +1 -0
- package/lang/translations/ko.po +1 -0
- package/lang/translations/ku.po +1 -0
- package/lang/translations/lt.po +1 -0
- package/lang/translations/lv.po +1 -0
- package/lang/translations/ms.po +1 -0
- package/lang/translations/nb.po +1 -0
- package/lang/translations/ne.po +1 -0
- package/lang/translations/nl.po +1 -0
- package/lang/translations/no.po +1 -0
- package/lang/translations/pl.po +1 -0
- package/lang/translations/pt-br.po +1 -0
- package/lang/translations/pt.po +1 -0
- package/lang/translations/ro.po +1 -0
- package/lang/translations/ru.po +1 -0
- package/lang/translations/sk.po +1 -0
- package/lang/translations/sl.po +1 -0
- package/lang/translations/sq.po +1 -0
- package/lang/translations/sr-latn.po +1 -0
- package/lang/translations/sr.po +1 -0
- package/lang/translations/sv.po +1 -0
- package/lang/translations/th.po +1 -0
- package/lang/translations/tk.po +1 -0
- package/lang/translations/tr.po +1 -0
- package/lang/translations/ug.po +1 -0
- package/lang/translations/uk.po +1 -0
- package/lang/translations/ur.po +1 -0
- package/lang/translations/uz.po +1 -0
- package/lang/translations/vi.po +1 -0
- package/lang/translations/zh-cn.po +1 -0
- package/lang/translations/zh.po +1 -0
- package/package.json +2 -6
- package/src/augmentation.d.ts +15 -15
- package/src/augmentation.js +5 -5
- package/src/blockquote.d.ts +30 -30
- package/src/blockquote.js +34 -34
- package/src/blockquotecommand.d.ts +61 -61
- package/src/blockquotecommand.js +172 -172
- package/src/blockquoteediting.d.ts +31 -31
- package/src/blockquoteediting.js +118 -118
- package/src/blockquoteui.d.ts +26 -26
- package/src/blockquoteui.js +50 -50
- package/src/index.d.ts +12 -12
- package/src/index.js +11 -11
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Serbian (Latin) (https://app.transifex.com/ckeditor/teams/11143/sr@latin/)\n"
|
16
16
|
"Language: sr@latin\n"
|
17
17
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/sr.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Serbian (https://app.transifex.com/ckeditor/teams/11143/sr/)\n"
|
16
16
|
"Language: sr\n"
|
17
17
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/sv.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Swedish (https://app.transifex.com/ckeditor/teams/11143/sv/)\n"
|
16
16
|
"Language: sv\n"
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/th.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Thai (https://app.transifex.com/ckeditor/teams/11143/th/)\n"
|
16
16
|
"Language: th\n"
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/tk.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Turkmen (https://app.transifex.com/ckeditor/teams/11143/tk/)\n"
|
16
16
|
"Language: tk\n"
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/tr.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Turkish (https://app.transifex.com/ckeditor/teams/11143/tr/)\n"
|
16
16
|
"Language: tr\n"
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/ug.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Uyghur (https://app.transifex.com/ckeditor/teams/11143/ug/)\n"
|
16
16
|
"Language: ug\n"
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/uk.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Ukrainian (https://app.transifex.com/ckeditor/teams/11143/uk/)\n"
|
16
16
|
"Language: uk\n"
|
17
17
|
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/ur.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Urdu (https://app.transifex.com/ckeditor/teams/11143/ur/)\n"
|
16
16
|
"Language: ur\n"
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/uz.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Uzbek (https://app.transifex.com/ckeditor/teams/11143/uz/)\n"
|
16
16
|
"Language: uz\n"
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/vi.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Vietnamese (https://app.transifex.com/ckeditor/teams/11143/vi/)\n"
|
16
16
|
"Language: vi\n"
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
|
16
16
|
"Language: zh_CN\n"
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/lang/translations/zh.po
CHANGED
@@ -15,6 +15,7 @@ msgstr ""
|
|
15
15
|
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
|
16
16
|
"Language: zh_TW\n"
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
19
|
|
19
20
|
msgctxt "Toolbar button tooltip for the Block quote feature."
|
20
21
|
msgid "Block quote"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-block-quote",
|
3
|
-
"version": "
|
3
|
+
"version": "40.0.0",
|
4
4
|
"description": "Block quote feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,11 +12,7 @@
|
|
12
12
|
],
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"ckeditor5": "
|
16
|
-
},
|
17
|
-
"engines": {
|
18
|
-
"node": ">=16.0.0",
|
19
|
-
"npm": ">=5.7.1"
|
15
|
+
"ckeditor5": "40.0.0"
|
20
16
|
},
|
21
17
|
"author": "CKSource (http://cksource.com/)",
|
22
18
|
"license": "GPL-2.0-or-later",
|
package/src/augmentation.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
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 { BlockQuote, BlockQuoteCommand, BlockQuoteEditing, BlockQuoteUI } from './index';
|
6
|
-
declare module '@ckeditor/ckeditor5-core' {
|
7
|
-
interface PluginsMap {
|
8
|
-
[BlockQuote.pluginName]: BlockQuote;
|
9
|
-
[BlockQuoteEditing.pluginName]: BlockQuoteEditing;
|
10
|
-
[BlockQuoteUI.pluginName]: BlockQuoteUI;
|
11
|
-
}
|
12
|
-
interface CommandsMap {
|
13
|
-
blockQuote: BlockQuoteCommand;
|
14
|
-
}
|
15
|
-
}
|
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 { BlockQuote, BlockQuoteCommand, BlockQuoteEditing, BlockQuoteUI } from './index';
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
7
|
+
interface PluginsMap {
|
8
|
+
[BlockQuote.pluginName]: BlockQuote;
|
9
|
+
[BlockQuoteEditing.pluginName]: BlockQuoteEditing;
|
10
|
+
[BlockQuoteUI.pluginName]: BlockQuoteUI;
|
11
|
+
}
|
12
|
+
interface CommandsMap {
|
13
|
+
blockQuote: BlockQuoteCommand;
|
14
|
+
}
|
15
|
+
}
|
package/src/augmentation.js
CHANGED
@@ -1,5 +1,5 @@
|
|
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
|
-
export {};
|
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
|
+
export {};
|
package/src/blockquote.d.ts
CHANGED
@@ -1,30 +1,30 @@
|
|
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
|
-
/**
|
6
|
-
* @module block-quote/blockquote
|
7
|
-
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import BlockQuoteEditing from './blockquoteediting';
|
10
|
-
import BlockQuoteUI from './blockquoteui';
|
11
|
-
/**
|
12
|
-
* The block quote plugin.
|
13
|
-
*
|
14
|
-
* For more information about this feature check the {@glink api/block-quote package page}.
|
15
|
-
*
|
16
|
-
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
17
|
-
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
18
|
-
*
|
19
|
-
* @extends module:core/plugin~Plugin
|
20
|
-
*/
|
21
|
-
export default class BlockQuote extends Plugin {
|
22
|
-
/**
|
23
|
-
* @inheritDoc
|
24
|
-
*/
|
25
|
-
static get requires(): readonly [typeof BlockQuoteEditing, typeof BlockQuoteUI];
|
26
|
-
/**
|
27
|
-
* @inheritDoc
|
28
|
-
*/
|
29
|
-
static get pluginName(): "BlockQuote";
|
30
|
-
}
|
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
|
+
/**
|
6
|
+
* @module block-quote/blockquote
|
7
|
+
*/
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
9
|
+
import BlockQuoteEditing from './blockquoteediting';
|
10
|
+
import BlockQuoteUI from './blockquoteui';
|
11
|
+
/**
|
12
|
+
* The block quote plugin.
|
13
|
+
*
|
14
|
+
* For more information about this feature check the {@glink api/block-quote package page}.
|
15
|
+
*
|
16
|
+
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
17
|
+
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
18
|
+
*
|
19
|
+
* @extends module:core/plugin~Plugin
|
20
|
+
*/
|
21
|
+
export default class BlockQuote extends Plugin {
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
static get requires(): readonly [typeof BlockQuoteEditing, typeof BlockQuoteUI];
|
26
|
+
/**
|
27
|
+
* @inheritDoc
|
28
|
+
*/
|
29
|
+
static get pluginName(): "BlockQuote";
|
30
|
+
}
|
package/src/blockquote.js
CHANGED
@@ -1,34 +1,34 @@
|
|
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
|
-
/**
|
6
|
-
* @module block-quote/blockquote
|
7
|
-
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import BlockQuoteEditing from './blockquoteediting';
|
10
|
-
import BlockQuoteUI from './blockquoteui';
|
11
|
-
/**
|
12
|
-
* The block quote plugin.
|
13
|
-
*
|
14
|
-
* For more information about this feature check the {@glink api/block-quote package page}.
|
15
|
-
*
|
16
|
-
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
17
|
-
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
18
|
-
*
|
19
|
-
* @extends module:core/plugin~Plugin
|
20
|
-
*/
|
21
|
-
export default class BlockQuote extends Plugin {
|
22
|
-
/**
|
23
|
-
* @inheritDoc
|
24
|
-
*/
|
25
|
-
static get requires() {
|
26
|
-
return [BlockQuoteEditing, BlockQuoteUI];
|
27
|
-
}
|
28
|
-
/**
|
29
|
-
* @inheritDoc
|
30
|
-
*/
|
31
|
-
static get pluginName() {
|
32
|
-
return 'BlockQuote';
|
33
|
-
}
|
34
|
-
}
|
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
|
+
/**
|
6
|
+
* @module block-quote/blockquote
|
7
|
+
*/
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
9
|
+
import BlockQuoteEditing from './blockquoteediting';
|
10
|
+
import BlockQuoteUI from './blockquoteui';
|
11
|
+
/**
|
12
|
+
* The block quote plugin.
|
13
|
+
*
|
14
|
+
* For more information about this feature check the {@glink api/block-quote package page}.
|
15
|
+
*
|
16
|
+
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
17
|
+
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
18
|
+
*
|
19
|
+
* @extends module:core/plugin~Plugin
|
20
|
+
*/
|
21
|
+
export default class BlockQuote extends Plugin {
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
static get requires() {
|
26
|
+
return [BlockQuoteEditing, BlockQuoteUI];
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* @inheritDoc
|
30
|
+
*/
|
31
|
+
static get pluginName() {
|
32
|
+
return 'BlockQuote';
|
33
|
+
}
|
34
|
+
}
|
@@ -1,61 +1,61 @@
|
|
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
|
-
/**
|
6
|
-
* @module block-quote/blockquotecommand
|
7
|
-
*/
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
9
|
-
/**
|
10
|
-
* The block quote command plugin.
|
11
|
-
*
|
12
|
-
* @extends module:core/command~Command
|
13
|
-
*/
|
14
|
-
export default class BlockQuoteCommand extends Command {
|
15
|
-
/**
|
16
|
-
* Whether the selection starts in a block quote.
|
17
|
-
*
|
18
|
-
* @observable
|
19
|
-
* @readonly
|
20
|
-
*/
|
21
|
-
value: boolean;
|
22
|
-
/**
|
23
|
-
* @inheritDoc
|
24
|
-
*/
|
25
|
-
refresh(): void;
|
26
|
-
/**
|
27
|
-
* Executes the command. When the command {@link #value is on}, all top-most block quotes within
|
28
|
-
* the selection will be removed. If it is off, all selected blocks will be wrapped with
|
29
|
-
* a block quote.
|
30
|
-
*
|
31
|
-
* @fires execute
|
32
|
-
* @param options Command options.
|
33
|
-
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
|
34
|
-
* otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
|
35
|
-
*/
|
36
|
-
execute(options?: {
|
37
|
-
forceValue?: boolean;
|
38
|
-
}): void;
|
39
|
-
/**
|
40
|
-
* Checks the command's {@link #value}.
|
41
|
-
*/
|
42
|
-
private _getValue;
|
43
|
-
/**
|
44
|
-
* Checks whether the command can be enabled in the current context.
|
45
|
-
*
|
46
|
-
* @returns Whether the command should be enabled.
|
47
|
-
*/
|
48
|
-
private _checkEnabled;
|
49
|
-
/**
|
50
|
-
* Removes the quote from given blocks.
|
51
|
-
*
|
52
|
-
* If blocks which are supposed to be "unquoted" are in the middle of a quote,
|
53
|
-
* start it or end it, then the quote will be split (if needed) and the blocks
|
54
|
-
* will be moved out of it, so other quoted blocks remained quoted.
|
55
|
-
*/
|
56
|
-
private _removeQuote;
|
57
|
-
/**
|
58
|
-
* Applies the quote to given blocks.
|
59
|
-
*/
|
60
|
-
private _applyQuote;
|
61
|
-
}
|
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
|
+
/**
|
6
|
+
* @module block-quote/blockquotecommand
|
7
|
+
*/
|
8
|
+
import { Command } from 'ckeditor5/src/core';
|
9
|
+
/**
|
10
|
+
* The block quote command plugin.
|
11
|
+
*
|
12
|
+
* @extends module:core/command~Command
|
13
|
+
*/
|
14
|
+
export default class BlockQuoteCommand extends Command {
|
15
|
+
/**
|
16
|
+
* Whether the selection starts in a block quote.
|
17
|
+
*
|
18
|
+
* @observable
|
19
|
+
* @readonly
|
20
|
+
*/
|
21
|
+
value: boolean;
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
refresh(): void;
|
26
|
+
/**
|
27
|
+
* Executes the command. When the command {@link #value is on}, all top-most block quotes within
|
28
|
+
* the selection will be removed. If it is off, all selected blocks will be wrapped with
|
29
|
+
* a block quote.
|
30
|
+
*
|
31
|
+
* @fires execute
|
32
|
+
* @param options Command options.
|
33
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
|
34
|
+
* otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
|
35
|
+
*/
|
36
|
+
execute(options?: {
|
37
|
+
forceValue?: boolean;
|
38
|
+
}): void;
|
39
|
+
/**
|
40
|
+
* Checks the command's {@link #value}.
|
41
|
+
*/
|
42
|
+
private _getValue;
|
43
|
+
/**
|
44
|
+
* Checks whether the command can be enabled in the current context.
|
45
|
+
*
|
46
|
+
* @returns Whether the command should be enabled.
|
47
|
+
*/
|
48
|
+
private _checkEnabled;
|
49
|
+
/**
|
50
|
+
* Removes the quote from given blocks.
|
51
|
+
*
|
52
|
+
* If blocks which are supposed to be "unquoted" are in the middle of a quote,
|
53
|
+
* start it or end it, then the quote will be split (if needed) and the blocks
|
54
|
+
* will be moved out of it, so other quoted blocks remained quoted.
|
55
|
+
*/
|
56
|
+
private _removeQuote;
|
57
|
+
/**
|
58
|
+
* Applies the quote to given blocks.
|
59
|
+
*/
|
60
|
+
private _applyQuote;
|
61
|
+
}
|