@ckeditor/ckeditor5-heading 47.6.1 → 48.0.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/ckeditor5-metadata.json +2 -2
- package/{src → dist}/heading.d.ts +1 -1
- package/{src → dist}/headingbuttonsui.d.ts +1 -1
- package/{src → dist}/headingcommand.d.ts +1 -1
- package/{src → dist}/headingconfig.d.ts +2 -2
- package/{src → dist}/headingediting.d.ts +2 -2
- package/{src → dist}/headingui.d.ts +1 -1
- package/dist/index-editor.css +12 -4
- package/dist/index.css +12 -9
- package/dist/index.css.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/{src → dist}/title.d.ts +8 -4
- package/{src → dist}/utils.d.ts +1 -1
- package/package.json +25 -48
- package/build/heading.js +0 -5
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -12
- package/lang/translations/af.po +0 -52
- package/lang/translations/ar.po +0 -52
- package/lang/translations/ast.po +0 -52
- package/lang/translations/az.po +0 -52
- package/lang/translations/be.po +0 -52
- package/lang/translations/bg.po +0 -52
- package/lang/translations/bn.po +0 -52
- package/lang/translations/bs.po +0 -52
- package/lang/translations/ca.po +0 -52
- package/lang/translations/cs.po +0 -52
- package/lang/translations/da.po +0 -52
- package/lang/translations/de-ch.po +0 -52
- package/lang/translations/de.po +0 -52
- package/lang/translations/el.po +0 -52
- package/lang/translations/en-au.po +0 -52
- package/lang/translations/en-gb.po +0 -52
- package/lang/translations/en.po +0 -52
- package/lang/translations/eo.po +0 -52
- package/lang/translations/es-co.po +0 -52
- package/lang/translations/es.po +0 -52
- package/lang/translations/et.po +0 -52
- package/lang/translations/eu.po +0 -52
- package/lang/translations/fa.po +0 -52
- package/lang/translations/fi.po +0 -52
- package/lang/translations/fr.po +0 -52
- package/lang/translations/gl.po +0 -52
- package/lang/translations/gu.po +0 -52
- package/lang/translations/he.po +0 -52
- package/lang/translations/hi.po +0 -52
- package/lang/translations/hr.po +0 -52
- package/lang/translations/hu.po +0 -52
- package/lang/translations/hy.po +0 -52
- package/lang/translations/id.po +0 -52
- package/lang/translations/it.po +0 -52
- package/lang/translations/ja.po +0 -52
- package/lang/translations/jv.po +0 -52
- package/lang/translations/kk.po +0 -52
- package/lang/translations/km.po +0 -52
- package/lang/translations/kn.po +0 -52
- package/lang/translations/ko.po +0 -52
- package/lang/translations/ku.po +0 -52
- package/lang/translations/lt.po +0 -52
- package/lang/translations/lv.po +0 -52
- package/lang/translations/ms.po +0 -52
- package/lang/translations/nb.po +0 -52
- package/lang/translations/ne.po +0 -52
- package/lang/translations/nl.po +0 -52
- package/lang/translations/no.po +0 -52
- package/lang/translations/oc.po +0 -52
- package/lang/translations/pl.po +0 -52
- package/lang/translations/pt-br.po +0 -52
- package/lang/translations/pt.po +0 -52
- package/lang/translations/ro.po +0 -52
- package/lang/translations/ru.po +0 -52
- package/lang/translations/si.po +0 -52
- package/lang/translations/sk.po +0 -52
- package/lang/translations/sl.po +0 -52
- package/lang/translations/sq.po +0 -52
- package/lang/translations/sr-latn.po +0 -52
- package/lang/translations/sr.po +0 -52
- package/lang/translations/sv.po +0 -52
- package/lang/translations/th.po +0 -52
- package/lang/translations/ti.po +0 -52
- package/lang/translations/tk.po +0 -52
- package/lang/translations/tr.po +0 -52
- package/lang/translations/tt.po +0 -52
- package/lang/translations/ug.po +0 -52
- package/lang/translations/uk.po +0 -52
- package/lang/translations/ur.po +0 -52
- package/lang/translations/uz.po +0 -52
- package/lang/translations/vi.po +0 -52
- package/lang/translations/zh-cn.po +0 -52
- package/lang/translations/zh.po +0 -52
- package/src/augmentation.js +0 -5
- package/src/heading.js +0 -42
- package/src/headingbuttonsui.js +0 -84
- package/src/headingcommand.js +0 -70
- package/src/headingconfig.js +0 -5
- package/src/headingediting.js +0 -107
- package/src/headingui.js +0 -171
- package/src/index.js +0 -15
- package/src/title.js +0 -463
- package/src/utils.js +0 -33
- package/theme/heading.css +0 -20
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
package/ckeditor5-metadata.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"className": "Title",
|
|
6
6
|
"description": "Enables support for adding the title field to your document. It helps ensure that there will always be a single title field at the beginning of the document.",
|
|
7
7
|
"docs": "features/title.html",
|
|
8
|
-
"path": "src/title.
|
|
8
|
+
"path": "src/title.ts",
|
|
9
9
|
"htmlOutput": [
|
|
10
10
|
{
|
|
11
11
|
"elements": "h1"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"className": "Heading",
|
|
18
18
|
"description": "Enables support for creating headings in your content. The heading levels available are configurable.",
|
|
19
19
|
"docs": "features/headings.html",
|
|
20
|
-
"path": "src/heading.
|
|
20
|
+
"path": "src/heading.ts",
|
|
21
21
|
"uiComponents": [
|
|
22
22
|
{
|
|
23
23
|
"type": "Dropdown",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module heading/heading
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5
|
|
8
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { HeadingEditing } from './headingediting.js';
|
|
10
10
|
import { HeadingUI } from './headingui.js';
|
|
11
11
|
import '../theme/heading.css';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module heading/headingbuttonsui
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5
|
|
8
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
/**
|
|
10
10
|
* The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the
|
|
11
11
|
* standard drop down component.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module heading/headingcommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command, type Editor } from 'ckeditor5
|
|
8
|
+
import { Command, type Editor } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
/**
|
|
10
10
|
* The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.
|
|
11
11
|
*/
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module heading/headingconfig
|
|
7
7
|
*/
|
|
8
|
-
import type { ArrayOrItem } from 'ckeditor5
|
|
9
|
-
import type { MatcherPattern, ViewElementDefinition } from 'ckeditor5
|
|
8
|
+
import type { ArrayOrItem } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import type { MatcherPattern, ViewElementDefinition } from '@ckeditor/ckeditor5-engine';
|
|
10
10
|
/**
|
|
11
11
|
* The configuration of the heading feature.
|
|
12
12
|
* The option is used by the {@link module:heading/headingediting~HeadingEditing} feature.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module heading/headingediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5
|
|
9
|
-
import { Paragraph } from 'ckeditor5
|
|
8
|
+
import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
|
|
9
|
+
import { Paragraph } from '@ckeditor/ckeditor5-paragraph';
|
|
10
10
|
/**
|
|
11
11
|
* The headings engine feature. It handles switching between block formats – headings and paragraph.
|
|
12
12
|
* This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.
|
package/dist/index-editor.css
CHANGED
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
.ck.ck-heading_heading1 .ck-button__label{
|
|
6
|
-
|
|
6
|
+
font-size:20px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.ck.ck-heading_heading2 .ck-button__label{
|
|
10
|
-
|
|
10
|
+
font-size:17px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.ck.ck-heading_heading3 .ck-button__label{
|
|
14
|
-
|
|
14
|
+
font-size:14px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ck[class*="ck-heading_heading"]{
|
|
18
|
-
|
|
18
|
+
font-weight:bold;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{
|
|
22
|
+
width:8em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{
|
|
26
|
+
min-width:18em;
|
|
19
27
|
}
|
package/dist/index.css
CHANGED
|
@@ -2,25 +2,28 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
5
|
.ck.ck-heading_heading1 .ck-button__label {
|
|
11
|
-
|
|
6
|
+
font-size: 20px;
|
|
12
7
|
}
|
|
13
8
|
|
|
14
9
|
.ck.ck-heading_heading2 .ck-button__label {
|
|
15
|
-
|
|
10
|
+
font-size: 17px;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
.ck.ck-heading_heading3 .ck-button__label {
|
|
19
|
-
|
|
14
|
+
font-size: 14px;
|
|
20
15
|
}
|
|
21
16
|
|
|
22
17
|
.ck[class*="ck-heading_heading"] {
|
|
23
|
-
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label {
|
|
22
|
+
width: 8em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {
|
|
26
|
+
min-width: 18em;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../theme/heading.css","index.css"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../theme/heading.css","index.css"],"names":[],"mappings":";;;;AAKA,CAAA,EAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,CAAA,EAAA,CAAA,aAAA,CAAA;ACJA,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI;AACjB;;ADOA,CAAA,EAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,CAAA,EAAA,CAAA,aAAA,CAAA;ACJA,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI;AACjB;;ADOA,CAAA,EAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,CAAA,EAAA,CAAA,aAAA,CAAA;ACJA,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI;AACjB;;ADOA,CAAA,EAAA,CAAA,KAAA,CAAA,CAAA,CAAA,EAAA,CAAA,eAAA,CAAA,CAAA,CAAA;ACJA,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI;AACnB;;ADQC,CAAA,EAAA,CAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,CAAA,EAAA,CAAA,aAAA,CAAA;ACLD,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG;AACZ;;ADQC,CAAA,EAAA,CAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CAAA,eAAA,CAAA,CAAA,EAAA,CAAA,UAAA,CAAA;ACLD,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI;AACjB;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n.ck.ck-heading_heading1 .ck-button__label {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 .ck-button__label {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 .ck-button__label {\n\tfont-size: 14px;\n}\n\n.ck[class*=\"ck-heading_heading\"] {\n\tfont-weight: bold;\n}\n\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n",".ck.ck-heading_heading1 .ck-button__label {\n font-size: 20px;\n}\n\n.ck.ck-heading_heading2 .ck-button__label {\n font-size: 17px;\n}\n\n.ck.ck-heading_heading3 .ck-button__label {\n font-size: 14px;\n}\n\n.ck[class*=\"ck-heading_heading\"] {\n font-weight: bold;\n}\n\n.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label {\n width: 8em;\n}\n\n.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {\n min-width: 18em;\n}\n\n/*# sourceMappingURL=index.css.map */"]}
|
package/dist/index.js
CHANGED
|
@@ -507,7 +507,7 @@ const titleLikeElements = new Set([
|
|
|
507
507
|
* @inheritDoc
|
|
508
508
|
*/ static get requires() {
|
|
509
509
|
return [
|
|
510
|
-
|
|
510
|
+
Paragraph
|
|
511
511
|
];
|
|
512
512
|
}
|
|
513
513
|
/**
|
|
@@ -747,7 +747,6 @@ const titleLikeElements = new Set([
|
|
|
747
747
|
const view = editor.editing.view;
|
|
748
748
|
const sourceElement = editor.sourceElement;
|
|
749
749
|
const titlePlaceholder = editor.config.get('title.placeholder') || t('Type your title');
|
|
750
|
-
const bodyPlaceholder = editor.config.get('placeholder') || sourceElement && sourceElement.tagName.toLowerCase() === 'textarea' && sourceElement.getAttribute('placeholder') || t('Type or paste your content here.');
|
|
751
750
|
// Attach placeholder to the view title element.
|
|
752
751
|
editor.editing.downcastDispatcher.on('insert:title-content', (evt, data, conversionApi)=>{
|
|
753
752
|
const element = conversionApi.mapper.toViewElement(data.item);
|
|
@@ -778,6 +777,7 @@ const titleLikeElements = new Set([
|
|
|
778
777
|
hideViewPlaceholder(writer, oldBody);
|
|
779
778
|
writer.removeAttribute('data-placeholder', oldBody);
|
|
780
779
|
}
|
|
780
|
+
const bodyPlaceholder = editor.config.get('roots')[viewRoot.rootName]?.placeholder || isTextArea(sourceElement) && sourceElement.getAttribute('placeholder') || t('Type or paste your content here.');
|
|
781
781
|
writer.setAttribute('data-placeholder', bodyPlaceholder, body);
|
|
782
782
|
bodyViewElements.set(viewRoot.rootName, body);
|
|
783
783
|
hasChanged = true;
|
|
@@ -935,6 +935,11 @@ const titleLikeElements = new Set([
|
|
|
935
935
|
}
|
|
936
936
|
return true;
|
|
937
937
|
}
|
|
938
|
+
/**
|
|
939
|
+
* Returns true when given element is a DOM textarea.
|
|
940
|
+
*/ function isTextArea(sourceElement) {
|
|
941
|
+
return !!sourceElement && sourceElement.tagName.toLowerCase() === 'textarea';
|
|
942
|
+
}
|
|
938
943
|
|
|
939
944
|
export { Heading, HeadingButtonsUI, HeadingCommand, HeadingEditing, HeadingUI, Title, getLocalizedOptions as _getLocalizedHeadingOptions };
|
|
940
945
|
//# sourceMappingURL=index.js.map
|