@ckeditor/ckeditor5-indent 41.3.1 → 41.4.0-alpha.0
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/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +367 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/types/augmentation.d.ts +28 -0
- package/dist/types/indent.d.ts +44 -0
- package/dist/types/indentblock.d.ts +46 -0
- package/dist/types/indentblockcommand.d.ts +60 -0
- package/dist/types/indentcommandbehavior/indentbehavior.d.ts +29 -0
- package/dist/types/indentcommandbehavior/indentusingclasses.d.ts +43 -0
- package/dist/types/indentcommandbehavior/indentusingoffset.d.ts +49 -0
- package/dist/types/indentconfig.d.ts +76 -0
- package/dist/types/indentediting.d.ts +30 -0
- package/dist/types/indentui.d.ts +35 -0
- package/dist/types/index.d.ts +18 -0
- package/package.json +3 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"sr":{"dictionary":{"Increase indent":"Повећај увлачење","Decrease indent":"Смањи увлачење"},getPluralForm(n){return (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"sv":{"dictionary":{"Increase indent":"Öka indrag","Decrease indent":"Minska indrag"},getPluralForm(n){return (n != 1);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"th":{"dictionary":{"Increase indent":"เพิ่มการเยื้อง","Decrease indent":"ลดการเยื้อง"},getPluralForm(n){return 0;}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"tk":{"dictionary":{"Increase indent":"Indent köpeltmek","Decrease indent":"Indent peseltmek"},getPluralForm(n){return (n != 1);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"tr":{"dictionary":{"Increase indent":"Girintiyi arttır","Decrease indent":"Girintiyi azalt"},getPluralForm(n){return (n > 1);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"ug":{"dictionary":{"Increase indent":"تارايتىشنى ئاشۇر","Decrease indent":"تارايتىشنى كېمەيت"},getPluralForm(n){return (n != 1);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"uk":{"dictionary":{"Increase indent":"Збільшити відступ","Decrease indent":"Зменшити відступ"},getPluralForm(n){return (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);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"ur":{"dictionary":{"Increase indent":"حاشیہ بڑھائیں","Decrease indent":"حاشیہ گھٹائیں"},getPluralForm(n){return (n != 1);}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"uz":{"dictionary":{"Increase indent":"chekinishni oshirish","Decrease indent":"chekinishni kamaytirish"},getPluralForm(n){return 0;}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"vi":{"dictionary":{"Increase indent":"Tăng lề","Decrease indent":"Giảm lề"},getPluralForm(n){return 0;}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"zh-cn":{"dictionary":{"Increase indent":"增加缩进","Decrease indent":"减少缩进"},getPluralForm(n){return 0;}}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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 default {"zh":{"dictionary":{"Increase indent":"增加縮排","Decrease indent":"減少縮排"},getPluralForm(n){return 0;}}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { IndentBlockConfig, Indent, IndentBlock, IndentUI, IndentBlockCommand } from './index.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the {@link module:indent/indentblock~IndentBlock block indentation feature}.
|
|
14
|
+
*
|
|
15
|
+
* Read more in {@link module:indent/indentconfig~IndentBlockConfig}.
|
|
16
|
+
*/
|
|
17
|
+
indentBlock?: IndentBlockConfig;
|
|
18
|
+
}
|
|
19
|
+
interface PluginsMap {
|
|
20
|
+
[Indent.pluginName]: Indent;
|
|
21
|
+
[IndentBlock.pluginName]: IndentBlock;
|
|
22
|
+
[IndentUI.pluginName]: IndentUI;
|
|
23
|
+
}
|
|
24
|
+
interface CommandsMap {
|
|
25
|
+
indentBlock: IndentBlockCommand;
|
|
26
|
+
outdentBlock: IndentBlockCommand;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indent
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import IndentEditing from './indentediting.js';
|
|
14
|
+
import IndentUI from './indentui.js';
|
|
15
|
+
/**
|
|
16
|
+
* The indent feature.
|
|
17
|
+
*
|
|
18
|
+
* This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.
|
|
19
|
+
*
|
|
20
|
+
* The compatible features are:
|
|
21
|
+
*
|
|
22
|
+
* * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.
|
|
23
|
+
* * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.
|
|
24
|
+
*
|
|
25
|
+
* This is a "glue" plugin that loads the following plugins:
|
|
26
|
+
*
|
|
27
|
+
* * The {@link module:indent/indentediting~IndentEditing indent editing feature}.
|
|
28
|
+
* * The {@link module:indent/indentui~IndentUI indent UI feature}.
|
|
29
|
+
*
|
|
30
|
+
* The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons
|
|
31
|
+
* that allow to increase or decrease text indentation of supported elements.
|
|
32
|
+
*
|
|
33
|
+
* **Note**: In order for the commands and buttons to work, at least one of compatible features is required.
|
|
34
|
+
*/
|
|
35
|
+
export default class Indent extends Plugin {
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
static get pluginName(): "Indent";
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
static get requires(): readonly [typeof IndentEditing, typeof IndentUI];
|
|
44
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentblock
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation feature.
|
|
15
|
+
*
|
|
16
|
+
* It registers the `'indentBlock'` and `'outdentBlock'` commands.
|
|
17
|
+
*
|
|
18
|
+
* If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to
|
|
19
|
+
* the `'indent'` and `'outdent'` commands.
|
|
20
|
+
*/
|
|
21
|
+
export default class IndentBlock extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(editor: Editor);
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "IndentBlock";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
afterInit(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Setups conversion for using offset indents.
|
|
40
|
+
*/
|
|
41
|
+
private _setupConversionUsingOffset;
|
|
42
|
+
/**
|
|
43
|
+
* Setups conversion for using classes.
|
|
44
|
+
*/
|
|
45
|
+
private _setupConversionUsingClasses;
|
|
46
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentblockcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { IndentBehavior } from './indentcommandbehavior/indentbehavior.js';
|
|
14
|
+
/**
|
|
15
|
+
* The indent block command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and
|
|
18
|
+
* `'outdentBlock'` for outdenting blocks.
|
|
19
|
+
*
|
|
20
|
+
* To increase block indentation at the current selection, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'indentBlock' );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* To decrease block indentation at the current selection, execute the command:
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* editor.execute( 'outdentBlock' );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export default class IndentBlockCommand extends Command {
|
|
33
|
+
/**
|
|
34
|
+
* The command's indentation behavior.
|
|
35
|
+
*/
|
|
36
|
+
private readonly _indentBehavior;
|
|
37
|
+
/**
|
|
38
|
+
* Creates an instance of the command.
|
|
39
|
+
*/
|
|
40
|
+
constructor(editor: Editor, indentBehavior: IndentBehavior);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
refresh(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
execute(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Returns blocks from selection that should have blockIndent selection set.
|
|
51
|
+
*/
|
|
52
|
+
private _getBlocksToChange;
|
|
53
|
+
/**
|
|
54
|
+
* Returns false if indentation cannot be applied, i.e.:
|
|
55
|
+
* - for blocks disallowed by schema declaration
|
|
56
|
+
* - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.
|
|
57
|
+
* Otherwise returns true.
|
|
58
|
+
*/
|
|
59
|
+
private _isIndentationChangeAllowed;
|
|
60
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentbehavior
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Provides indentation behavior to {@link module:indent/indentblockcommand~IndentBlockCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface IndentBehavior {
|
|
16
|
+
/**
|
|
17
|
+
* The direction of indentation.
|
|
18
|
+
*/
|
|
19
|
+
isForward: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if the command should be enabled.
|
|
22
|
+
*/
|
|
23
|
+
checkEnabled: (indentAttributeValue: string) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a new indent attribute value based on the current indent.
|
|
26
|
+
* This method returns `undefined` when the indentation should be removed.
|
|
27
|
+
*/
|
|
28
|
+
getNextIndent: (indentAttributeValue: string) => string | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentusingclasses
|
|
11
|
+
*/
|
|
12
|
+
import type { IndentBehavior } from './indentbehavior.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation behavior that uses classes to set indentation.
|
|
15
|
+
*/
|
|
16
|
+
export default class IndentUsingClasses implements IndentBehavior {
|
|
17
|
+
/**
|
|
18
|
+
* The direction of indentation.
|
|
19
|
+
*/
|
|
20
|
+
isForward: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* A list of classes used for indentation.
|
|
23
|
+
*/
|
|
24
|
+
classes: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of the indentation behavior.
|
|
27
|
+
*
|
|
28
|
+
* @param config.direction The direction of indentation.
|
|
29
|
+
* @param config.classes A list of classes used for indentation.
|
|
30
|
+
*/
|
|
31
|
+
constructor(config: {
|
|
32
|
+
direction: 'forward' | 'backward';
|
|
33
|
+
classes: Array<string>;
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
checkEnabled(indentAttributeValue: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
getNextIndent(indentAttributeValue: string): string | undefined;
|
|
43
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentcommandbehavior/indentusingoffset
|
|
11
|
+
*/
|
|
12
|
+
import type { IndentBehavior } from './indentbehavior.js';
|
|
13
|
+
/**
|
|
14
|
+
* The block indentation behavior that uses offsets to set indentation.
|
|
15
|
+
*/
|
|
16
|
+
export default class IndentUsingOffset implements IndentBehavior {
|
|
17
|
+
/**
|
|
18
|
+
* The direction of indentation.
|
|
19
|
+
*/
|
|
20
|
+
isForward: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The offset of the next indentation step.
|
|
23
|
+
*/
|
|
24
|
+
offset: number;
|
|
25
|
+
/**
|
|
26
|
+
* Indentation unit.
|
|
27
|
+
*/
|
|
28
|
+
unit: string;
|
|
29
|
+
/**
|
|
30
|
+
* Creates an instance of the indentation behavior.
|
|
31
|
+
*
|
|
32
|
+
* @param config.direction The direction of indentation.
|
|
33
|
+
* @param config.offset The offset of the next indentation step.
|
|
34
|
+
* @param config.unit Indentation unit.
|
|
35
|
+
*/
|
|
36
|
+
constructor(config: {
|
|
37
|
+
direction: 'forward' | 'backward';
|
|
38
|
+
offset: number;
|
|
39
|
+
unit: string;
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
checkEnabled(indentAttributeValue: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
getNextIndent(indentAttributeValue: string): string | undefined;
|
|
49
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentconfig
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the block indentation feature.
|
|
14
|
+
*
|
|
15
|
+
* If no {@link module:indent/indentconfig~IndentBlockConfig#classes} are set, the block indentation feature will use
|
|
16
|
+
* {@link module:indent/indentconfig~IndentBlockConfig#offset} and {@link module:indent/indentconfig~IndentBlockConfig#unit} to
|
|
17
|
+
* create indentation steps.
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* ClassicEditor
|
|
21
|
+
* .create( editorElement, {
|
|
22
|
+
* indentBlock: {
|
|
23
|
+
* offset: 2,
|
|
24
|
+
* unit: 'em'
|
|
25
|
+
* }
|
|
26
|
+
* } )
|
|
27
|
+
* .then( ... )
|
|
28
|
+
* .catch( ... );
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Alternatively, the block indentation feature may set one of defined {@link module:indent/indentconfig~IndentBlockConfig#classes} as
|
|
32
|
+
* indentation steps:
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* ClassicEditor
|
|
36
|
+
* .create( editorElement, {
|
|
37
|
+
* indentBlock: {
|
|
38
|
+
* classes: [
|
|
39
|
+
* 'indent-a', // The first step - smallest indentation.
|
|
40
|
+
* 'indent-b',
|
|
41
|
+
* 'indent-c',
|
|
42
|
+
* 'indent-d',
|
|
43
|
+
* 'indent-e' // The last step - biggest indentation.
|
|
44
|
+
* ]
|
|
45
|
+
* }
|
|
46
|
+
* } )
|
|
47
|
+
* .then( ... )
|
|
48
|
+
* .catch( ... );
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* In the example above only 5 indentation steps will be available.
|
|
52
|
+
*
|
|
53
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
54
|
+
*/
|
|
55
|
+
export interface IndentBlockConfig {
|
|
56
|
+
/**
|
|
57
|
+
* The size of indentation {@link module:indent/indentconfig~IndentBlockConfig#unit units} for each indentation step.
|
|
58
|
+
*
|
|
59
|
+
* @default 40
|
|
60
|
+
*/
|
|
61
|
+
offset?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The unit used for indentation {@link module:indent/indentconfig~IndentBlockConfig#offset}.
|
|
64
|
+
*
|
|
65
|
+
* @default 'px'
|
|
66
|
+
*/
|
|
67
|
+
unit?: string;
|
|
68
|
+
/**
|
|
69
|
+
* An optional list of classes to use for indenting the editor content. If not set or set to an empty array, no classes will be used.
|
|
70
|
+
* The {@link module:indent/indentconfig~IndentBlockConfig#unit `indentBlock.unit`} and
|
|
71
|
+
* {@link module:indent/indentconfig~IndentBlockConfig#offset `indentBlock.offset`} properties will be used instead.
|
|
72
|
+
*
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
classes?: Array<string>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module indent/indentediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The indent editing feature.
|
|
15
|
+
*
|
|
16
|
+
* This plugin registers the `'indent'` and `'outdent'` commands.
|
|
17
|
+
*
|
|
18
|
+
* **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the
|
|
19
|
+
* {@link module:indent/indent~Indent indent feature} API documentation.
|
|
20
|
+
*/
|
|
21
|
+
export default class IndentEditing extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "IndentEditing";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
init(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
/**
|
|
11
|
+
* The indent UI feature.
|
|
12
|
+
*
|
|
13
|
+
* This plugin registers the `'indent'` and `'outdent'` buttons.
|
|
14
|
+
*
|
|
15
|
+
* **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in
|
|
16
|
+
* the {@link module:indent/indent~Indent indent feature} API documentation.
|
|
17
|
+
*/
|
|
18
|
+
export default class IndentUI extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "IndentUI";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
init(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Defines UI buttons for both toolbar and menu bar.
|
|
29
|
+
*/
|
|
30
|
+
private _defineButton;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a button to use either in toolbar or in menu bar.
|
|
33
|
+
*/
|
|
34
|
+
private _createButton;
|
|
35
|
+
}
|