@ckeditor/ckeditor5-heading 41.3.0-alpha.4 → 41.3.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/build/heading.js +1 -1
- package/package.json +2 -3
- package/src/headingui.js +48 -1
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -16
- package/dist/index.css +0 -26
- package/dist/index.css.map +0 -1
- package/dist/translations/ar.d.ts +0 -8
- package/dist/translations/ar.js +0 -5
- package/dist/translations/az.d.ts +0 -8
- package/dist/translations/az.js +0 -5
- package/dist/translations/bg.d.ts +0 -8
- package/dist/translations/bg.js +0 -5
- package/dist/translations/bn.d.ts +0 -8
- package/dist/translations/bn.js +0 -5
- package/dist/translations/bs.d.ts +0 -8
- package/dist/translations/bs.js +0 -5
- package/dist/translations/ca.d.ts +0 -8
- package/dist/translations/ca.js +0 -5
- package/dist/translations/cs.d.ts +0 -8
- package/dist/translations/cs.js +0 -5
- package/dist/translations/da.d.ts +0 -8
- package/dist/translations/da.js +0 -5
- package/dist/translations/de-ch.d.ts +0 -8
- package/dist/translations/de-ch.js +0 -5
- package/dist/translations/de.d.ts +0 -8
- package/dist/translations/de.js +0 -5
- package/dist/translations/el.d.ts +0 -8
- package/dist/translations/el.js +0 -5
- package/dist/translations/en-au.d.ts +0 -8
- package/dist/translations/en-au.js +0 -5
- package/dist/translations/en-gb.d.ts +0 -8
- package/dist/translations/en-gb.js +0 -5
- package/dist/translations/en.d.ts +0 -8
- package/dist/translations/en.js +0 -5
- package/dist/translations/eo.d.ts +0 -8
- package/dist/translations/eo.js +0 -5
- package/dist/translations/es.d.ts +0 -8
- package/dist/translations/es.js +0 -5
- package/dist/translations/et.d.ts +0 -8
- package/dist/translations/et.js +0 -5
- package/dist/translations/eu.d.ts +0 -8
- package/dist/translations/eu.js +0 -5
- package/dist/translations/fa.d.ts +0 -8
- package/dist/translations/fa.js +0 -5
- package/dist/translations/fi.d.ts +0 -8
- package/dist/translations/fi.js +0 -5
- package/dist/translations/fr.d.ts +0 -8
- package/dist/translations/fr.js +0 -5
- package/dist/translations/gl.d.ts +0 -8
- package/dist/translations/gl.js +0 -5
- package/dist/translations/he.d.ts +0 -8
- package/dist/translations/he.js +0 -5
- package/dist/translations/hi.d.ts +0 -8
- package/dist/translations/hi.js +0 -5
- package/dist/translations/hr.d.ts +0 -8
- package/dist/translations/hr.js +0 -5
- package/dist/translations/hu.d.ts +0 -8
- package/dist/translations/hu.js +0 -5
- package/dist/translations/hy.d.ts +0 -8
- package/dist/translations/hy.js +0 -5
- package/dist/translations/id.d.ts +0 -8
- package/dist/translations/id.js +0 -5
- package/dist/translations/it.d.ts +0 -8
- package/dist/translations/it.js +0 -5
- package/dist/translations/ja.d.ts +0 -8
- package/dist/translations/ja.js +0 -5
- package/dist/translations/jv.d.ts +0 -8
- package/dist/translations/jv.js +0 -5
- package/dist/translations/km.d.ts +0 -8
- package/dist/translations/km.js +0 -5
- package/dist/translations/kn.d.ts +0 -8
- package/dist/translations/kn.js +0 -5
- package/dist/translations/ko.d.ts +0 -8
- package/dist/translations/ko.js +0 -5
- package/dist/translations/ku.d.ts +0 -8
- package/dist/translations/ku.js +0 -5
- package/dist/translations/lt.d.ts +0 -8
- package/dist/translations/lt.js +0 -5
- package/dist/translations/lv.d.ts +0 -8
- package/dist/translations/lv.js +0 -5
- package/dist/translations/ms.d.ts +0 -8
- package/dist/translations/ms.js +0 -5
- package/dist/translations/nb.d.ts +0 -8
- package/dist/translations/nb.js +0 -5
- package/dist/translations/ne.d.ts +0 -8
- package/dist/translations/ne.js +0 -5
- package/dist/translations/nl.d.ts +0 -8
- package/dist/translations/nl.js +0 -5
- package/dist/translations/no.d.ts +0 -8
- package/dist/translations/no.js +0 -5
- package/dist/translations/pl.d.ts +0 -8
- package/dist/translations/pl.js +0 -5
- package/dist/translations/pt-br.d.ts +0 -8
- package/dist/translations/pt-br.js +0 -5
- package/dist/translations/pt.d.ts +0 -8
- package/dist/translations/pt.js +0 -5
- package/dist/translations/ro.d.ts +0 -8
- package/dist/translations/ro.js +0 -5
- package/dist/translations/ru.d.ts +0 -8
- package/dist/translations/ru.js +0 -5
- package/dist/translations/sk.d.ts +0 -8
- package/dist/translations/sk.js +0 -5
- package/dist/translations/sl.d.ts +0 -8
- package/dist/translations/sl.js +0 -5
- package/dist/translations/sq.d.ts +0 -8
- package/dist/translations/sq.js +0 -5
- package/dist/translations/sr-latn.d.ts +0 -8
- package/dist/translations/sr-latn.js +0 -5
- package/dist/translations/sr.d.ts +0 -8
- package/dist/translations/sr.js +0 -5
- package/dist/translations/sv.d.ts +0 -8
- package/dist/translations/sv.js +0 -5
- package/dist/translations/th.d.ts +0 -8
- package/dist/translations/th.js +0 -5
- package/dist/translations/tk.d.ts +0 -8
- package/dist/translations/tk.js +0 -5
- package/dist/translations/tr.d.ts +0 -8
- package/dist/translations/tr.js +0 -5
- package/dist/translations/ug.d.ts +0 -8
- package/dist/translations/ug.js +0 -5
- package/dist/translations/uk.d.ts +0 -8
- package/dist/translations/uk.js +0 -5
- package/dist/translations/ur.d.ts +0 -8
- package/dist/translations/ur.js +0 -5
- package/dist/translations/uz.d.ts +0 -8
- package/dist/translations/uz.js +0 -5
- package/dist/translations/vi.d.ts +0 -8
- package/dist/translations/vi.js +0 -5
- package/dist/translations/zh-cn.d.ts +0 -8
- package/dist/translations/zh-cn.js +0 -5
- package/dist/translations/zh.d.ts +0 -8
- package/dist/translations/zh.js +0 -5
- package/dist/types/augmentation.d.ts +0 -34
- package/dist/types/heading.d.ts +0 -36
- package/dist/types/headingbuttonsui.d.ts +0 -55
- package/dist/types/headingcommand.d.ts +0 -52
- package/dist/types/headingconfig.d.ts +0 -149
- package/dist/types/headingediting.d.ts +0 -46
- package/dist/types/headingui.d.ts +0 -26
- package/dist/types/index.d.ts +0 -20
- package/dist/types/title.d.ts +0 -119
- package/dist/types/utils.d.ts +0 -22
package/dist/translations/tk.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"Abzas","Heading":"Sözbaşy","Choose heading":"Sözbaşy saýlaň","Heading 1":"Sözbaşy 1","Heading 2":"Sözbaşy 2","Heading 3":"Sözbaşy 3","Heading 4":"Sözbaşy 4","Heading 5":"Sözbaşy 5","Heading 6":"Sözbaşy 6","Type your title":"Sözbaşyny ýazyň","Type or paste your content here.":"Mazmunyňyzy şu ýere ýazyň ýa-da goýuň."},getPluralForm(n){return (n != 1);}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/tr.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"Paragraf","Heading":"Başlık","Choose heading":"Başlık tipi seç","Heading 1":"1. Seviye Başlık","Heading 2":"2. Seviye Başlık","Heading 3":"3. Seviye Başlık","Heading 4":"4. Seviye Başlık","Heading 5":"5. Seviye Başlık","Heading 6":"6. Seviye Başlık","Type your title":"Başlığınızı yazınız","Type or paste your content here.":"İçeriğinizi buraya yapıştırın yada yazın."},getPluralForm(n){return (n > 1);}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/ug.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"ئابزاس","Heading":"ماۋزۇ","Choose heading":"ماۋزۇ تاللاش","Heading 1":"ماۋزۇ 1","Heading 2":"ماۋزۇ 2","Heading 3":"ماۋزۇ 3","Heading 4":"ماۋزۇ 4","Heading 5":"ماۋزۇ 5","Heading 6":"ماۋزۇ 6","Type your title":"ماۋزۇ كىرگۈزۈلىدۇ","Type or paste your content here.":"مەزمۇن بۇ جايغا كىرگۈزۈلىدۇ ياكى چاپلىنىدۇ."},getPluralForm(n){return (n != 1);}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/uk.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"Параграф","Heading":"Заголовок","Choose heading":"Оберіть заголовок","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4","Heading 5":"Заголовок 5","Heading 6":"Заголовок 6","Type your title":"Введіть назву","Type or paste your content here.":"Введіть або вставте свій вміст тут."},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);}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/ur.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"پیرا","Heading":"سرخی","Choose heading":"سرخی منتخب کریں","Heading 1":"سرخی 1","Heading 2":"سرخی 2","Heading 3":"سرخی 3","Heading 4":"سرخی 4","Heading 5":"سرخی 5","Heading 6":"سرخی 6","Type your title":"عنوان ٹایپ کریں","Type or paste your content here.":"اپنا مواد یہاں ٹایپ یا چسپاں کریں."},getPluralForm(n){return (n != 1);}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/uz.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"Paragraf","Heading":"Uslub","Choose heading":"Uslubni tanlash","Heading 1":"Sarlavha 1","Heading 2":"Sarlavha 2","Heading 3":"Sarlavha 3","Heading 4":"Sarlavha 4","Heading 5":"Sarlavha 5","Heading 6":"Sarlavha 6","Type your title":"Sarlavhani kiriting","Type or paste your content here.":"Matningizni shu yerga kiriting yoki joylashtiring"},getPluralForm(n){return 0;}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/vi.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"Đoạn văn","Heading":"Tiêu đề","Choose heading":"Chọn tiêu đề","Heading 1":"Tiêu đề 1","Heading 2":"Tiêu đề 2","Heading 3":"Tiêu đề 3","Heading 4":"Tiêu đề 4","Heading 5":"Tiêu đề 5","Heading 6":"Tiêu đề 6","Type your title":"Nhập tựa đề","Type or paste your content here.":"Nhập hoặc dán nội dung tại đây"},getPluralForm(n){return 0;}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"段落","Heading":"标题","Choose heading":"标题类型","Heading 1":"标题 1","Heading 2":"标题 2","Heading 3":"标题 3","Heading 4":"标题 4","Heading 5":"标题 5","Heading 6":"标题 6","Type your title":"输入标题","Type or paste your content here.":"在这里输入或粘贴内容"},getPluralForm(n){return 0;}}}
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
package/dist/translations/zh.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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":{"Paragraph":"段落","Heading":"標題","Choose heading":"選取標題","Heading 1":"標題 1","Heading 2":"標題 2","Heading 3":"標題 3","Heading 4":"標題 4","Heading 5":"標題 5","Heading 6":"標題 6","Type your title":"輸入你的標題","Type or paste your content here.":"在此輸入或貼上你的內容。"},getPluralForm(n){return 0;}}}
|
|
@@ -1,34 +0,0 @@
|
|
|
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 { Heading, HeadingCommand, HeadingConfig, HeadingEditing, HeadingUI, Title, TitleConfig } from './index.js';
|
|
10
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
-
interface EditorConfig {
|
|
12
|
-
/**
|
|
13
|
-
* The configuration of the heading feature. Introduced by the {@link module:heading/headingediting~HeadingEditing} feature.
|
|
14
|
-
*
|
|
15
|
-
* Read more in {@link module:heading/headingconfig~HeadingConfig}.
|
|
16
|
-
*/
|
|
17
|
-
heading?: HeadingConfig;
|
|
18
|
-
/**
|
|
19
|
-
* The configuration of the {@link module:heading/title~Title title feature}.
|
|
20
|
-
*
|
|
21
|
-
* Read more in {@link module:heading/title~TitleConfig}.
|
|
22
|
-
*/
|
|
23
|
-
title?: TitleConfig;
|
|
24
|
-
}
|
|
25
|
-
interface PluginsMap {
|
|
26
|
-
[Heading.pluginName]: Heading;
|
|
27
|
-
[HeadingEditing.pluginName]: HeadingEditing;
|
|
28
|
-
[HeadingUI.pluginName]: HeadingUI;
|
|
29
|
-
[Title.pluginName]: Title;
|
|
30
|
-
}
|
|
31
|
-
interface CommandsMap {
|
|
32
|
-
heading: HeadingCommand;
|
|
33
|
-
}
|
|
34
|
-
}
|
package/dist/types/heading.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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 heading/heading
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
import HeadingEditing from './headingediting.js';
|
|
14
|
-
import HeadingUI from './headingui.js';
|
|
15
|
-
import '../theme/heading.css';
|
|
16
|
-
/**
|
|
17
|
-
* The headings feature.
|
|
18
|
-
*
|
|
19
|
-
* For a detailed overview, check the {@glink features/headings Headings feature} guide
|
|
20
|
-
* and the {@glink api/heading package page}.
|
|
21
|
-
*
|
|
22
|
-
* This is a "glue" plugin which loads the {@link module:heading/headingediting~HeadingEditing heading editing feature}
|
|
23
|
-
* and {@link module:heading/headingui~HeadingUI heading UI feature}.
|
|
24
|
-
*
|
|
25
|
-
* @extends module:core/plugin~Plugin
|
|
26
|
-
*/
|
|
27
|
-
export default class Heading extends Plugin {
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
static get requires(): readonly [typeof HeadingEditing, typeof HeadingUI];
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
static get pluginName(): "Heading";
|
|
36
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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 heading/headingbuttonsui
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the
|
|
15
|
-
* standard drop down component.
|
|
16
|
-
*
|
|
17
|
-
* This feature is not enabled by default by the {@link module:heading/heading~Heading} plugin and needs to be
|
|
18
|
-
* installed manually to the editor configuration.
|
|
19
|
-
*
|
|
20
|
-
* Plugin introduces button UI elements, which names are same as `model` property from {@link module:heading/headingconfig~HeadingOption}.
|
|
21
|
-
*
|
|
22
|
-
* ```ts
|
|
23
|
-
* ClassicEditor
|
|
24
|
-
* .create( {
|
|
25
|
-
* plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]
|
|
26
|
-
* heading: {
|
|
27
|
-
* options: [
|
|
28
|
-
* { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
|
29
|
-
* { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
|
|
30
|
-
* { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
|
|
31
|
-
* { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }
|
|
32
|
-
* ]
|
|
33
|
-
* },
|
|
34
|
-
* toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]
|
|
35
|
-
* } )
|
|
36
|
-
* .then( ... )
|
|
37
|
-
* .catch( ... );
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* NOTE: The `'paragraph'` button is defined in by the {@link module:paragraph/paragraphbuttonui~ParagraphButtonUI} plugin
|
|
41
|
-
* which needs to be loaded manually as well.
|
|
42
|
-
*
|
|
43
|
-
* It is possible to use custom icons by providing `icon` config option in {@link module:heading/headingconfig~HeadingOption}.
|
|
44
|
-
* For the default configuration standard icons are used.
|
|
45
|
-
*/
|
|
46
|
-
export default class HeadingButtonsUI extends Plugin {
|
|
47
|
-
/**
|
|
48
|
-
* @inheritDoc
|
|
49
|
-
*/
|
|
50
|
-
init(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Creates single button view from provided configuration option.
|
|
53
|
-
*/
|
|
54
|
-
private _createButton;
|
|
55
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
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 heading/headingcommand
|
|
11
|
-
*/
|
|
12
|
-
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.
|
|
15
|
-
*/
|
|
16
|
-
export default class HeadingCommand extends Command {
|
|
17
|
-
/**
|
|
18
|
-
* If the selection starts in a heading (which {@link #modelElements is supported by this command})
|
|
19
|
-
* the value is set to the name of that heading model element.
|
|
20
|
-
* It is set to `false` otherwise.
|
|
21
|
-
*
|
|
22
|
-
* @observable
|
|
23
|
-
* @readonly
|
|
24
|
-
*/
|
|
25
|
-
value: false | string;
|
|
26
|
-
/**
|
|
27
|
-
* Set of defined model's elements names that this command support.
|
|
28
|
-
* See {@link module:heading/headingconfig~HeadingOption}.
|
|
29
|
-
*/
|
|
30
|
-
readonly modelElements: Array<string>;
|
|
31
|
-
/**
|
|
32
|
-
* Creates an instance of the command.
|
|
33
|
-
*
|
|
34
|
-
* @param editor Editor instance.
|
|
35
|
-
* @param modelElements Names of the element which this command can apply in the model.
|
|
36
|
-
*/
|
|
37
|
-
constructor(editor: Editor, modelElements: Array<string>);
|
|
38
|
-
/**
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
refresh(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Executes the command. Applies the heading to the selected blocks or, if the first selected
|
|
44
|
-
* block is a heading already, turns selected headings (of this level only) to paragraphs.
|
|
45
|
-
*
|
|
46
|
-
* @param options.value Name of the element which this command will apply in the model.
|
|
47
|
-
* @fires execute
|
|
48
|
-
*/
|
|
49
|
-
execute(options: {
|
|
50
|
-
value: string;
|
|
51
|
-
}): void;
|
|
52
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
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 heading/headingconfig
|
|
11
|
-
*/
|
|
12
|
-
import type { ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
13
|
-
import type { MatcherPattern, ViewElementDefinition } from 'ckeditor5/src/engine.js';
|
|
14
|
-
/**
|
|
15
|
-
* The configuration of the heading feature.
|
|
16
|
-
* The option is used by the {@link module:heading/headingediting~HeadingEditing} feature.
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* ClassicEditor
|
|
20
|
-
* .create( {
|
|
21
|
-
* heading: ... // Heading feature config.
|
|
22
|
-
* } )
|
|
23
|
-
* .then( ... )
|
|
24
|
-
* .catch( ... );
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
28
|
-
*/
|
|
29
|
-
export interface HeadingConfig {
|
|
30
|
-
/**
|
|
31
|
-
* The available heading options.
|
|
32
|
-
*
|
|
33
|
-
* The default value is:
|
|
34
|
-
* ```ts
|
|
35
|
-
* const headingConfig = {
|
|
36
|
-
* options: [
|
|
37
|
-
* { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
|
38
|
-
* { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
|
|
39
|
-
* { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
|
|
40
|
-
* { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }
|
|
41
|
-
* ]
|
|
42
|
-
* };
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* It defines 3 levels of headings. In the editor model they will use `heading1`, `heading2`, and `heading3` elements.
|
|
46
|
-
* Their respective view elements (so the elements output by the editor) will be: `h2`, `h3`, and `h4`. This means that
|
|
47
|
-
* if you choose "Heading 1" in the headings dropdown the editor will turn the current block to `<heading1>` in the model
|
|
48
|
-
* which will result in rendering (and outputting to data) the `<h2>` element.
|
|
49
|
-
*
|
|
50
|
-
* The `title` and `class` properties will be used by the `headings` dropdown to render available options.
|
|
51
|
-
* Usually, the first option in the headings dropdown is the "Paragraph" option, hence it's also defined on the list.
|
|
52
|
-
* However, you don't need to define its view representation because it's handled by
|
|
53
|
-
* the {@link module:paragraph/paragraph~Paragraph} feature (which is required by
|
|
54
|
-
* the {@link module:heading/headingediting~HeadingEditing} feature).
|
|
55
|
-
*
|
|
56
|
-
* You can **read more** about configuring heading levels and **see more examples** in
|
|
57
|
-
* the {@glink features/headings Headings} guide.
|
|
58
|
-
*
|
|
59
|
-
* Note: In the model you should always start from `heading1`, regardless of how the headings are represented in the view.
|
|
60
|
-
* That's assumption is used by features like {@link module:autoformat/autoformat~Autoformat} to know which element
|
|
61
|
-
* they should use when applying the first level heading.
|
|
62
|
-
*
|
|
63
|
-
* The defined headings are also available as values passed to the `'heading'` command under their model names.
|
|
64
|
-
* For example, the below code will apply `<heading1>` to the current selection:
|
|
65
|
-
*
|
|
66
|
-
* ```ts
|
|
67
|
-
* editor.execute( 'heading', { value: 'heading1' } );
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
options?: Array<HeadingOption>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Heading option descriptor.
|
|
74
|
-
*/
|
|
75
|
-
export type HeadingOption = HeadingElementOption | HeadingParagraphOption | HeadingCustomElementOption;
|
|
76
|
-
export interface HeadingElementOption {
|
|
77
|
-
/**
|
|
78
|
-
* Name of the model element to convert.
|
|
79
|
-
*/
|
|
80
|
-
model: 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6';
|
|
81
|
-
/**
|
|
82
|
-
* Definition of a view element to convert from/to.
|
|
83
|
-
*/
|
|
84
|
-
view: ViewElementDefinition;
|
|
85
|
-
/**
|
|
86
|
-
* The user-readable title of the option.
|
|
87
|
-
*/
|
|
88
|
-
title: string;
|
|
89
|
-
/**
|
|
90
|
-
* The class which will be added to the dropdown item representing this option.
|
|
91
|
-
*/
|
|
92
|
-
class: string;
|
|
93
|
-
/**
|
|
94
|
-
* Icon used by {@link module:heading/headingbuttonsui~HeadingButtonsUI}. It can be omitted when using the default configuration.
|
|
95
|
-
*/
|
|
96
|
-
icon?: string;
|
|
97
|
-
/**
|
|
98
|
-
* An array with all matched elements that the view-to-model conversion should also accept.
|
|
99
|
-
*/
|
|
100
|
-
upcastAlso?: ArrayOrItem<ViewElementDefinition | MatcherPattern>;
|
|
101
|
-
}
|
|
102
|
-
export interface HeadingCustomElementOption {
|
|
103
|
-
/**
|
|
104
|
-
* Name of the model element to convert.
|
|
105
|
-
*/
|
|
106
|
-
model: `heading${string}`;
|
|
107
|
-
/**
|
|
108
|
-
* Definition of a view element to convert from/to.
|
|
109
|
-
*/
|
|
110
|
-
view: ViewElementDefinition;
|
|
111
|
-
/**
|
|
112
|
-
* The user-readable title of the option.
|
|
113
|
-
*/
|
|
114
|
-
title: string;
|
|
115
|
-
/**
|
|
116
|
-
* The class which will be added to the dropdown item representing this option.
|
|
117
|
-
*/
|
|
118
|
-
class: string;
|
|
119
|
-
/**
|
|
120
|
-
* Icon used by {@link module:heading/headingbuttonsui~HeadingButtonsUI}. It can be omitted when using the default configuration.
|
|
121
|
-
*/
|
|
122
|
-
icon?: string;
|
|
123
|
-
/**
|
|
124
|
-
* An array with all matched elements that the view-to-model conversion should also accept.
|
|
125
|
-
*/
|
|
126
|
-
upcastAlso?: ArrayOrItem<ViewElementDefinition | MatcherPattern>;
|
|
127
|
-
}
|
|
128
|
-
export interface HeadingParagraphOption {
|
|
129
|
-
/**
|
|
130
|
-
* Name of the model element to convert.
|
|
131
|
-
*/
|
|
132
|
-
model: 'paragraph';
|
|
133
|
-
/**
|
|
134
|
-
* The user-readable title of the option.
|
|
135
|
-
*/
|
|
136
|
-
title: string;
|
|
137
|
-
/**
|
|
138
|
-
* The class which will be added to the dropdown item representing this option.
|
|
139
|
-
* */
|
|
140
|
-
class: string;
|
|
141
|
-
/**
|
|
142
|
-
* Icon used by {@link module:heading/headingbuttonsui~HeadingButtonsUI}. It can be omitted when using the default configuration.
|
|
143
|
-
*/
|
|
144
|
-
icon?: string;
|
|
145
|
-
/**
|
|
146
|
-
* An array with all matched elements that the view-to-model conversion should also accept.
|
|
147
|
-
*/
|
|
148
|
-
upcastAlso?: ArrayOrItem<ViewElementDefinition | MatcherPattern>;
|
|
149
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
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 heading/headingediting
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
import { Paragraph } from 'ckeditor5/src/paragraph.js';
|
|
14
|
-
/**
|
|
15
|
-
* The headings engine feature. It handles switching between block formats – headings and paragraph.
|
|
16
|
-
* This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.
|
|
17
|
-
* It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.
|
|
18
|
-
*/
|
|
19
|
-
export default class HeadingEditing extends Plugin {
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
static get pluginName(): "HeadingEditing";
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
constructor(editor: Editor);
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
static get requires(): readonly [typeof Paragraph];
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
init(): void;
|
|
36
|
-
/**
|
|
37
|
-
* @inheritDoc
|
|
38
|
-
*/
|
|
39
|
-
afterInit(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Adds default conversion for `h1` -> `heading1` with a low priority.
|
|
42
|
-
*
|
|
43
|
-
* @param editor Editor instance on which to add the `h1` conversion.
|
|
44
|
-
*/
|
|
45
|
-
private _addDefaultH1Conversion;
|
|
46
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
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 heading/headingui
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
import '../theme/heading.css';
|
|
14
|
-
/**
|
|
15
|
-
* The headings UI feature. It introduces the `headings` dropdown.
|
|
16
|
-
*/
|
|
17
|
-
export default class HeadingUI extends Plugin {
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
static get pluginName(): "HeadingUI";
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
init(): void;
|
|
26
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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 heading
|
|
11
|
-
*/
|
|
12
|
-
export { default as Heading } from './heading.js';
|
|
13
|
-
export type { HeadingOption, HeadingElementOption } from './headingconfig.js';
|
|
14
|
-
export { default as HeadingEditing } from './headingediting.js';
|
|
15
|
-
export { default as HeadingUI } from './headingui.js';
|
|
16
|
-
export { default as HeadingButtonsUI } from './headingbuttonsui.js';
|
|
17
|
-
export { default as Title, type TitleConfig } from './title.js';
|
|
18
|
-
export type { HeadingConfig } from './headingconfig.js';
|
|
19
|
-
export type { default as HeadingCommand } from './headingcommand.js';
|
|
20
|
-
import './augmentation.js';
|