@ckeditor/ckeditor5-heading 41.3.0-alpha.4 → 41.3.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/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/types/title.d.ts
DELETED
|
@@ -1,119 +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/title
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The Title plugin.
|
|
15
|
-
*
|
|
16
|
-
* It splits the document into `Title` and `Body` sections.
|
|
17
|
-
*/
|
|
18
|
-
export default class Title extends Plugin {
|
|
19
|
-
/**
|
|
20
|
-
* A reference to an empty paragraph in the body
|
|
21
|
-
* created when there is no element in the body for the placeholder purposes.
|
|
22
|
-
*/
|
|
23
|
-
private _bodyPlaceholder;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
static get pluginName(): "Title";
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
static get requires(): readonly ["Paragraph"];
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
init(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the title of the document. Note that because this plugin does not allow any formatting inside
|
|
38
|
-
* the title element, the output of this method will be a plain text, with no HTML tags.
|
|
39
|
-
*
|
|
40
|
-
* It is not recommended to use this method together with features that insert markers to the
|
|
41
|
-
* data output, like comments or track changes features. If such markers start in the title and end in the
|
|
42
|
-
* body, the result of this method might be incorrect.
|
|
43
|
-
*
|
|
44
|
-
* @param options Additional configuration passed to the conversion process.
|
|
45
|
-
* See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.
|
|
46
|
-
* @returns The title of the document.
|
|
47
|
-
*/
|
|
48
|
-
getTitle(options?: Record<string, unknown>): string;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the body of the document.
|
|
51
|
-
*
|
|
52
|
-
* Note that it is not recommended to use this method together with features that insert markers to the
|
|
53
|
-
* data output, like comments or track changes features. If such markers start in the title and end in the
|
|
54
|
-
* body, the result of this method might be incorrect.
|
|
55
|
-
*
|
|
56
|
-
* @param options Additional configuration passed to the conversion process.
|
|
57
|
-
* See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.
|
|
58
|
-
* @returns The body of the document.
|
|
59
|
-
*/
|
|
60
|
-
getBody(options?: Record<string, unknown>): string;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the `title` element when it is in the document. Returns `undefined` otherwise.
|
|
63
|
-
*/
|
|
64
|
-
private _getTitleElement;
|
|
65
|
-
/**
|
|
66
|
-
* Model post-fixer callback that ensures that `title` has only one `title-content` child.
|
|
67
|
-
* All additional children should be moved after the `title` element and renamed to a paragraph.
|
|
68
|
-
*/
|
|
69
|
-
private _fixTitleContent;
|
|
70
|
-
/**
|
|
71
|
-
* Model post-fixer callback that creates a title element when it is missing,
|
|
72
|
-
* takes care of the correct position of it and removes additional title elements.
|
|
73
|
-
*/
|
|
74
|
-
private _fixTitleElement;
|
|
75
|
-
/**
|
|
76
|
-
* Model post-fixer callback that adds an empty paragraph at the end of the document
|
|
77
|
-
* when it is needed for the placeholder purposes.
|
|
78
|
-
*/
|
|
79
|
-
private _fixBodyElement;
|
|
80
|
-
/**
|
|
81
|
-
* Model post-fixer callback that removes a paragraph from the end of the document
|
|
82
|
-
* if it was created for the placeholder purposes and is not needed anymore.
|
|
83
|
-
*/
|
|
84
|
-
private _fixExtraParagraph;
|
|
85
|
-
/**
|
|
86
|
-
* Attaches the `Title` and `Body` placeholders to the title and/or content.
|
|
87
|
-
*/
|
|
88
|
-
private _attachPlaceholders;
|
|
89
|
-
/**
|
|
90
|
-
* Creates navigation between the title and body sections using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.
|
|
91
|
-
*/
|
|
92
|
-
private _attachTabPressHandling;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* The configuration of the {@link module:heading/title~Title title feature}.
|
|
96
|
-
*
|
|
97
|
-
* ```ts
|
|
98
|
-
* ClassicEditor
|
|
99
|
-
* .create( document.querySelector( '#editor' ), {
|
|
100
|
-
* plugins: [ Title, ... ],
|
|
101
|
-
* title: {
|
|
102
|
-
* placeholder: 'My custom placeholder for the title'
|
|
103
|
-
* },
|
|
104
|
-
* placeholder: 'My custom placeholder for the body'
|
|
105
|
-
* } )
|
|
106
|
-
* .then( ... )
|
|
107
|
-
* .catch( ... );
|
|
108
|
-
* ```
|
|
109
|
-
*
|
|
110
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
|
111
|
-
*/
|
|
112
|
-
export interface TitleConfig {
|
|
113
|
-
/**
|
|
114
|
-
* Defines a custom value of the placeholder for the title field.
|
|
115
|
-
*
|
|
116
|
-
* Read more in {@link module:heading/title~TitleConfig}.
|
|
117
|
-
*/
|
|
118
|
-
placeholder?: string;
|
|
119
|
-
}
|
package/dist/types/utils.d.ts
DELETED
|
@@ -1,22 +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/utils
|
|
11
|
-
*/
|
|
12
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
import type { HeadingOption } from './headingconfig.js';
|
|
14
|
-
/**
|
|
15
|
-
* Returns heading options as defined in `config.heading.options` but processed to consider
|
|
16
|
-
* the editor localization, i.e. to display {@link module:heading/headingconfig~HeadingOption}
|
|
17
|
-
* in the correct language.
|
|
18
|
-
*
|
|
19
|
-
* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}
|
|
20
|
-
* when the user configuration is defined because the editor does not exist yet.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getLocalizedOptions(editor: Editor): Array<HeadingOption>;
|