@ckeditor/ckeditor5-html-support 41.2.0 → 41.3.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/content-index.css +4 -0
- package/dist/editor-index.css +44 -0
- package/dist/index.css +63 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +4004 -0
- package/dist/index.js.map +1 -0
- package/dist/types/augmentation.d.ts +33 -0
- package/dist/types/converters.d.ts +60 -0
- package/dist/types/datafilter.d.ts +304 -0
- package/dist/types/dataschema.d.ts +183 -0
- package/dist/types/fullpage.d.ts +21 -0
- package/dist/types/generalhtmlsupport.d.ts +98 -0
- package/dist/types/generalhtmlsupportconfig.d.ts +77 -0
- package/dist/types/htmlcomment.d.ts +71 -0
- package/dist/types/htmlpagedataprocessor.d.ts +22 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/integrations/codeblock.d.ts +23 -0
- package/dist/types/integrations/customelement.d.ts +27 -0
- package/dist/types/integrations/dualcontent.d.ts +45 -0
- package/dist/types/integrations/heading.d.ts +31 -0
- package/dist/types/integrations/image.d.ts +26 -0
- package/dist/types/integrations/integrationutils.d.ts +15 -0
- package/dist/types/integrations/list.d.ts +27 -0
- package/dist/types/integrations/mediaembed.d.ts +26 -0
- package/dist/types/integrations/script.d.ts +26 -0
- package/dist/types/integrations/style.d.ts +26 -0
- package/dist/types/integrations/table.d.ts +23 -0
- package/dist/types/schemadefinitions.d.ts +13 -0
- package/dist/types/utils.d.ts +72 -0
- package/package.json +3 -2
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
* @module html-support/generalhtmlsupport
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { type ArrayOrItem } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import DataFilter from './datafilter.js';
|
|
11
|
+
import CodeBlockElementSupport from './integrations/codeblock.js';
|
|
12
|
+
import DualContentModelElementSupport from './integrations/dualcontent.js';
|
|
13
|
+
import HeadingElementSupport from './integrations/heading.js';
|
|
14
|
+
import ImageElementSupport from './integrations/image.js';
|
|
15
|
+
import MediaEmbedElementSupport from './integrations/mediaembed.js';
|
|
16
|
+
import ScriptElementSupport from './integrations/script.js';
|
|
17
|
+
import TableElementSupport from './integrations/table.js';
|
|
18
|
+
import StyleElementSupport from './integrations/style.js';
|
|
19
|
+
import ListElementSupport from './integrations/list.js';
|
|
20
|
+
import CustomElementSupport from './integrations/customelement.js';
|
|
21
|
+
import type { Selectable } from 'ckeditor5/src/engine.js';
|
|
22
|
+
/**
|
|
23
|
+
* The General HTML Support feature.
|
|
24
|
+
*
|
|
25
|
+
* This is a "glue" plugin which initializes the {@link module:html-support/datafilter~DataFilter data filter} configuration
|
|
26
|
+
* and features integration with the General HTML Support.
|
|
27
|
+
*/
|
|
28
|
+
export default class GeneralHtmlSupport extends Plugin {
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get pluginName(): "GeneralHtmlSupport";
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get requires(): readonly [typeof DataFilter, typeof CodeBlockElementSupport, typeof DualContentModelElementSupport, typeof HeadingElementSupport, typeof ImageElementSupport, typeof MediaEmbedElementSupport, typeof ScriptElementSupport, typeof TableElementSupport, typeof StyleElementSupport, typeof ListElementSupport, typeof CustomElementSupport];
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
init(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a GHS model attribute name related to a given view element name.
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
* @param viewElementName A view element name.
|
|
46
|
+
*/
|
|
47
|
+
getGhsAttributeNameForElement(viewElementName: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Updates GHS model attribute for a specified view element name, so it includes the given class name.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
* @param viewElementName A view element name.
|
|
53
|
+
* @param className The css class to add.
|
|
54
|
+
* @param selectable The selection or element to update.
|
|
55
|
+
*/
|
|
56
|
+
addModelHtmlClass(viewElementName: string, className: ArrayOrItem<string>, selectable: Selectable): void;
|
|
57
|
+
/**
|
|
58
|
+
* Updates GHS model attribute for a specified view element name, so it does not include the given class name.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
* @param viewElementName A view element name.
|
|
62
|
+
* @param className The css class to remove.
|
|
63
|
+
* @param selectable The selection or element to update.
|
|
64
|
+
*/
|
|
65
|
+
removeModelHtmlClass(viewElementName: string, className: ArrayOrItem<string>, selectable: Selectable): void;
|
|
66
|
+
/**
|
|
67
|
+
* Updates GHS model attribute for a specified view element name, so it includes the given attribute.
|
|
68
|
+
*
|
|
69
|
+
* @param viewElementName A view element name.
|
|
70
|
+
* @param attributes The object with attributes to set.
|
|
71
|
+
* @param selectable The selection or element to update.
|
|
72
|
+
*/
|
|
73
|
+
private setModelHtmlAttributes;
|
|
74
|
+
/**
|
|
75
|
+
* Updates GHS model attribute for a specified view element name, so it does not include the given attribute.
|
|
76
|
+
*
|
|
77
|
+
* @param viewElementName A view element name.
|
|
78
|
+
* @param attributeName The attribute name (or names) to remove.
|
|
79
|
+
* @param selectable The selection or element to update.
|
|
80
|
+
*/
|
|
81
|
+
private removeModelHtmlAttributes;
|
|
82
|
+
/**
|
|
83
|
+
* Updates GHS model attribute for a specified view element name, so it includes a given style.
|
|
84
|
+
*
|
|
85
|
+
* @param viewElementName A view element name.
|
|
86
|
+
* @param styles The object with styles to set.
|
|
87
|
+
* @param selectable The selection or element to update.
|
|
88
|
+
*/
|
|
89
|
+
private setModelHtmlStyles;
|
|
90
|
+
/**
|
|
91
|
+
* Updates GHS model attribute for a specified view element name, so it does not include a given style.
|
|
92
|
+
*
|
|
93
|
+
* @param viewElementName A view element name.
|
|
94
|
+
* @param properties The style (or styles list) to remove.
|
|
95
|
+
* @param selectable The selection or element to update.
|
|
96
|
+
*/
|
|
97
|
+
private removeModelHtmlStyles;
|
|
98
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
* @module html-support/generalhtmlsupportconfig
|
|
7
|
+
*/
|
|
8
|
+
import type { MatcherObjectPattern } from 'ckeditor5/src/engine.js';
|
|
9
|
+
/**
|
|
10
|
+
* The configuration of the General HTML Support feature.
|
|
11
|
+
* The option is used by the {@link module:html-support/generalhtmlsupport~GeneralHtmlSupport} feature.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* ClassicEditor
|
|
15
|
+
* .create( {
|
|
16
|
+
* htmlSupport: ... // General HTML Support feature config.
|
|
17
|
+
* } )
|
|
18
|
+
* .then( ... )
|
|
19
|
+
* .catch( ... );
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
23
|
+
*/
|
|
24
|
+
export interface GeneralHtmlSupportConfig {
|
|
25
|
+
/**
|
|
26
|
+
* The configuration of allowed content rules used by General HTML Support.
|
|
27
|
+
*
|
|
28
|
+
* Setting this configuration option will enable HTML features that are not explicitly supported by any other
|
|
29
|
+
* dedicated CKEditor 5 features.
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* const htmlSupportConfig.allow = [
|
|
33
|
+
* {
|
|
34
|
+
* name: 'div', // Enable 'div' element support,
|
|
35
|
+
* classes: [ 'special-container' ], // allow 'special-container' class,
|
|
36
|
+
* styles: 'background', // allow 'background' style,
|
|
37
|
+
* attributes: true // allow any attribute (can be empty).
|
|
38
|
+
* },
|
|
39
|
+
* {
|
|
40
|
+
* name: 'p', // Extend existing Paragraph feature,
|
|
41
|
+
* classes: 'highlighted' // with 'highlighted' class,
|
|
42
|
+
* attributes: [
|
|
43
|
+
* { key: 'data-i18n-context, value: true } // and i18n attribute.
|
|
44
|
+
* ]
|
|
45
|
+
* }
|
|
46
|
+
* ];
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
allow?: Array<MatcherObjectPattern>;
|
|
50
|
+
/**
|
|
51
|
+
* The configuration of disallowed content rules used by General HTML Support.
|
|
52
|
+
*
|
|
53
|
+
* Setting this configuration option will disable listed HTML features.
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* const htmlSupportConfig.disallow = [
|
|
57
|
+
* {
|
|
58
|
+
* name: /[\s\S]+/ // For every HTML feature,
|
|
59
|
+
* attributes: {
|
|
60
|
+
* key: /^on.*$/ // disable 'on*' attributes, like 'onClick', 'onError' etc.
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
* ];
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
disallow?: Array<MatcherObjectPattern>;
|
|
67
|
+
/**
|
|
68
|
+
* The configuration of allowed empty inline elements that should not be removed.
|
|
69
|
+
*
|
|
70
|
+
* Note that you should also add an appropriate entry to {@link #allow} list.
|
|
71
|
+
*
|
|
72
|
+
* ```ts
|
|
73
|
+
* const htmlSupportConfig.allowEmpty = [ 'i', 'span' ];
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
allowEmpty?: Array<string>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* @module html-support/htmlcomment
|
|
7
|
+
*/
|
|
8
|
+
import type { Position, Range } from 'ckeditor5/src/engine.js';
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
/**
|
|
11
|
+
* The HTML comment feature. It preserves the HTML comments (`<!-- -->`) in the editor data.
|
|
12
|
+
*
|
|
13
|
+
* For a detailed overview, check the {@glink features/html/html-comments HTML comment feature documentation}.
|
|
14
|
+
*/
|
|
15
|
+
export default class HtmlComment extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "HtmlComment";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
init(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an HTML comment on the specified position and returns its ID.
|
|
26
|
+
*
|
|
27
|
+
* *Note*: If two comments are created at the same position, the second comment will be inserted before the first one.
|
|
28
|
+
*
|
|
29
|
+
* @returns Comment ID. This ID can be later used to e.g. remove the comment from the content.
|
|
30
|
+
*/
|
|
31
|
+
createHtmlComment(position: Position, content: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Removes an HTML comment with the given comment ID.
|
|
34
|
+
*
|
|
35
|
+
* It does nothing and returns `false` if the comment with the given ID does not exist.
|
|
36
|
+
* Otherwise it removes the comment and returns `true`.
|
|
37
|
+
*
|
|
38
|
+
* Note that a comment can be removed also by removing the content around the comment.
|
|
39
|
+
*
|
|
40
|
+
* @param commentID The ID of the comment to be removed.
|
|
41
|
+
* @returns `true` when the comment with the given ID was removed, `false` otherwise.
|
|
42
|
+
*/
|
|
43
|
+
removeHtmlComment(commentID: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the HTML comment data for the comment with a given ID.
|
|
46
|
+
*
|
|
47
|
+
* Returns `null` if the comment does not exist.
|
|
48
|
+
*/
|
|
49
|
+
getHtmlCommentData(commentID: string): HtmlCommentData | null;
|
|
50
|
+
/**
|
|
51
|
+
* Gets all HTML comments in the given range.
|
|
52
|
+
*
|
|
53
|
+
* By default, it includes comments at the range boundaries.
|
|
54
|
+
*
|
|
55
|
+
* @param range
|
|
56
|
+
* @param options.skipBoundaries When set to `true` the range boundaries will be skipped.
|
|
57
|
+
* @returns HTML comment IDs
|
|
58
|
+
*/
|
|
59
|
+
getHtmlCommentsInRange(range: Range, { skipBoundaries }?: {
|
|
60
|
+
skipBoundaries?: boolean | undefined;
|
|
61
|
+
}): Array<string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An interface for the HTML comments data.
|
|
65
|
+
*
|
|
66
|
+
* It consists of the {@link module:engine/model/position~Position `position`} and `content`.
|
|
67
|
+
*/
|
|
68
|
+
export interface HtmlCommentData {
|
|
69
|
+
position: Position;
|
|
70
|
+
content: string;
|
|
71
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
* @module html-support/htmlpagedataprocessor
|
|
7
|
+
*/
|
|
8
|
+
import { HtmlDataProcessor, type ViewDocumentFragment } from 'ckeditor5/src/engine.js';
|
|
9
|
+
/**
|
|
10
|
+
* The full page HTML data processor class.
|
|
11
|
+
* This data processor implementation uses HTML as input and output data.
|
|
12
|
+
*/
|
|
13
|
+
export default class HtmlPageDataProcessor extends HtmlDataProcessor {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
toView(data: string): ViewDocumentFragment;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
toData(viewFragment: ViewDocumentFragment): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* @module html-support
|
|
7
|
+
*/
|
|
8
|
+
export { default as GeneralHtmlSupport } from './generalhtmlsupport.js';
|
|
9
|
+
export { default as DataFilter } from './datafilter.js';
|
|
10
|
+
export { default as DataSchema, type DataSchemaBlockElementDefinition } from './dataschema.js';
|
|
11
|
+
export { default as HtmlComment } from './htmlcomment.js';
|
|
12
|
+
export { default as FullPage } from './fullpage.js';
|
|
13
|
+
export { default as HtmlPageDataProcessor } from './htmlpagedataprocessor.js';
|
|
14
|
+
export type { GeneralHtmlSupportConfig } from './generalhtmlsupportconfig.js';
|
|
15
|
+
export type { default as CodeBlockElementSupport } from './integrations/codeblock.js';
|
|
16
|
+
export type { default as CustomElementSupport } from './integrations/customelement.js';
|
|
17
|
+
export type { default as ListElementSupport } from './integrations/list.js';
|
|
18
|
+
export type { default as DualContentModelElementSupport } from './integrations/dualcontent.js';
|
|
19
|
+
export type { default as HeadingElementSupport } from './integrations/heading.js';
|
|
20
|
+
export type { default as ImageElementSupport } from './integrations/image.js';
|
|
21
|
+
export type { default as MediaEmbedElementSupport } from './integrations/mediaembed.js';
|
|
22
|
+
export type { default as ScriptElementSupport } from './integrations/script.js';
|
|
23
|
+
export type { default as StyleElementSupport } from './integrations/style.js';
|
|
24
|
+
export type { default as TableElementSupport } from './integrations/table.js';
|
|
25
|
+
import './augmentation.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import DataFilter from '../datafilter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Provides the General HTML Support integration with {@link module:code-block/codeblock~CodeBlock Code Block} feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class CodeBlockElementSupport extends Plugin {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
static get requires(): readonly [typeof DataFilter];
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get pluginName(): "CodeBlockElementSupport";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
* @module html-support/integrations/customelement
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import DataSchema from '../dataschema.js';
|
|
10
|
+
import DataFilter from '../datafilter.js';
|
|
11
|
+
/**
|
|
12
|
+
* Provides the General HTML Support for custom elements (not registered in the {@link module:html-support/dataschema~DataSchema}).
|
|
13
|
+
*/
|
|
14
|
+
export default class CustomElementSupport extends Plugin {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get requires(): readonly [typeof DataFilter, typeof DataSchema];
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "CustomElementSupport";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
init(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import DataFilter from '../datafilter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Provides the General HTML Support integration for elements which can behave like sectioning element (e.g. article) or
|
|
9
|
+
* element accepting only inline content (e.g. paragraph).
|
|
10
|
+
*
|
|
11
|
+
* The distinction between this two content models is important for choosing correct schema model and proper content conversion.
|
|
12
|
+
* As an example, it ensures that:
|
|
13
|
+
*
|
|
14
|
+
* * children elements paragraphing is enabled for sectioning elements only,
|
|
15
|
+
* * element and its content can be correctly handled by editing view (splitting and merging elements),
|
|
16
|
+
* * model element HTML is semantically correct and easier to work with.
|
|
17
|
+
*
|
|
18
|
+
* If element contains any block element, it will be treated as a sectioning element and registered using
|
|
19
|
+
* {@link module:html-support/dataschema~DataSchemaDefinition#model} and
|
|
20
|
+
* {@link module:html-support/dataschema~DataSchemaDefinition#modelSchema} in editor schema.
|
|
21
|
+
* Otherwise, it will be registered under {@link module:html-support/dataschema~DataSchemaBlockElementDefinition#paragraphLikeModel} model
|
|
22
|
+
* name with model schema accepting only inline content (inheriting from `$block`).
|
|
23
|
+
*/
|
|
24
|
+
export default class DualContentModelElementSupport extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires(): readonly [typeof DataFilter];
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get pluginName(): "DualContentModelElementSupport";
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
init(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Checks whether the given view element includes any other block element.
|
|
39
|
+
*/
|
|
40
|
+
private _hasBlockContent;
|
|
41
|
+
/**
|
|
42
|
+
* Adds attribute filtering conversion for the given data schema.
|
|
43
|
+
*/
|
|
44
|
+
private _addAttributeConversion;
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
* @module html-support/integrations/heading
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Enter } from 'ckeditor5/src/enter.js';
|
|
10
|
+
import DataSchema from '../dataschema.js';
|
|
11
|
+
/**
|
|
12
|
+
* Provides the General HTML Support integration with {@link module:heading/heading~Heading Heading} feature.
|
|
13
|
+
*/
|
|
14
|
+
export default class HeadingElementSupport extends Plugin {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get requires(): readonly [typeof DataSchema, typeof Enter];
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "HeadingElementSupport";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
init(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Registers all elements supported by HeadingEditing to enable custom attributes for those elements.
|
|
29
|
+
*/
|
|
30
|
+
private registerHeadingElements;
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @module html-support/integrations/image
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import DataFilter from '../datafilter.js';
|
|
10
|
+
/**
|
|
11
|
+
* Provides the General HTML Support integration with the {@link module:image/image~Image Image} feature.
|
|
12
|
+
*/
|
|
13
|
+
export default class ImageElementSupport extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): readonly [typeof DataFilter];
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "ImageElementSupport";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';
|
|
6
|
+
/**
|
|
7
|
+
* @module html-support/integrations/integrationutils
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Returns the first view element descendant matching the given view name.
|
|
11
|
+
* Includes view element itself.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function getDescendantElement(writer: DowncastWriter, containerElement: ViewElement, elementName: string): ViewElement | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import DataFilter from '../datafilter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Provides the General HTML Support integration with the {@link module:list/list~List List} feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class ListElementSupport extends Plugin {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
static get requires(): readonly [typeof DataFilter];
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get pluginName(): "ListElementSupport";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
afterInit(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @module html-support/integrations/mediaembed
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import DataFilter from '../datafilter.js';
|
|
10
|
+
/**
|
|
11
|
+
* Provides the General HTML Support integration with {@link module:media-embed/mediaembed~MediaEmbed Media Embed} feature.
|
|
12
|
+
*/
|
|
13
|
+
export default class MediaEmbedElementSupport extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): readonly [typeof DataFilter];
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "MediaEmbedElementSupport";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @module html-support/integrations/script
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import DataFilter from '../datafilter.js';
|
|
10
|
+
/**
|
|
11
|
+
* Provides the General HTML Support for `script` elements.
|
|
12
|
+
*/
|
|
13
|
+
export default class ScriptElementSupport extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): readonly [typeof DataFilter];
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "ScriptElementSupport";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @module html-support/integrations/style
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import DataFilter from '../datafilter.js';
|
|
10
|
+
/**
|
|
11
|
+
* Provides the General HTML Support for `style` elements.
|
|
12
|
+
*/
|
|
13
|
+
export default class StyleElementSupport extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): readonly [typeof DataFilter];
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "StyleElementSupport";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import DataFilter from '../datafilter.js';
|
|
7
|
+
/**
|
|
8
|
+
* Provides the General HTML Support integration with {@link module:table/table~Table Table} feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class TableElementSupport extends Plugin {
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
static get requires(): readonly [typeof DataFilter];
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get pluginName(): "TableElementSupport";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
import type { DataSchemaBlockElementDefinition, DataSchemaInlineElementDefinition } from './dataschema.js';
|
|
6
|
+
/**
|
|
7
|
+
* @module html-support/schemadefinitions
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
block: DataSchemaBlockElementDefinition[];
|
|
11
|
+
inline: DataSchemaInlineElementDefinition[];
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|