@ckeditor/ckeditor5-html-support 48.2.0 → 48.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.
@@ -1,35 +1,35 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import type { GeneralHtmlSupport, DataFilter, DataSchema, GeneralHtmlSupportConfig, CodeBlockElementSupport, CustomElementSupport, ListElementSupport, DualContentModelElementSupport, HeadingElementSupport, ImageElementSupport, MediaEmbedElementSupport, ScriptElementSupport, StyleElementSupport, TableElementSupport, HorizontalLineElementSupport, HtmlComment, FullPage, EmptyBlock } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the General HTML Support feature.
10
- * Introduced by the {@link module:html-support/generalhtmlsupport~GeneralHtmlSupport} feature.
11
- *
12
- * Read more in {@link module:html-support/generalhtmlsupportconfig~GeneralHtmlSupportConfig}.
13
- */
14
- htmlSupport?: GeneralHtmlSupportConfig;
15
- }
16
- interface PluginsMap {
17
- [GeneralHtmlSupport.pluginName]: GeneralHtmlSupport;
18
- [DataFilter.pluginName]: DataFilter;
19
- [DataSchema.pluginName]: DataSchema;
20
- [CodeBlockElementSupport.pluginName]: CodeBlockElementSupport;
21
- [CustomElementSupport.pluginName]: CustomElementSupport;
22
- [ListElementSupport.pluginName]: ListElementSupport;
23
- [DualContentModelElementSupport.pluginName]: DualContentModelElementSupport;
24
- [HeadingElementSupport.pluginName]: HeadingElementSupport;
25
- [ImageElementSupport.pluginName]: ImageElementSupport;
26
- [MediaEmbedElementSupport.pluginName]: MediaEmbedElementSupport;
27
- [ScriptElementSupport.pluginName]: ScriptElementSupport;
28
- [StyleElementSupport.pluginName]: StyleElementSupport;
29
- [TableElementSupport.pluginName]: TableElementSupport;
30
- [HorizontalLineElementSupport.pluginName]: HorizontalLineElementSupport;
31
- [HtmlComment.pluginName]: HtmlComment;
32
- [FullPage.pluginName]: FullPage;
33
- [EmptyBlock.pluginName]: EmptyBlock;
34
- }
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { GeneralHtmlSupport, DataFilter, DataSchema, GeneralHtmlSupportConfig, CodeBlockElementSupport, CustomElementSupport, ListElementSupport, DualContentModelElementSupport, HeadingElementSupport, ImageElementSupport, MediaEmbedElementSupport, ScriptElementSupport, StyleElementSupport, TableElementSupport, HorizontalLineElementSupport, HtmlComment, FullPage, EmptyBlock } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the General HTML Support feature.
10
+ * Introduced by the {@link module:html-support/generalhtmlsupport~GeneralHtmlSupport} feature.
11
+ *
12
+ * Read more in {@link module:html-support/generalhtmlsupportconfig~GeneralHtmlSupportConfig}.
13
+ */
14
+ htmlSupport?: GeneralHtmlSupportConfig;
15
+ }
16
+ interface PluginsMap {
17
+ [GeneralHtmlSupport.pluginName]: GeneralHtmlSupport;
18
+ [DataFilter.pluginName]: DataFilter;
19
+ [DataSchema.pluginName]: DataSchema;
20
+ [CodeBlockElementSupport.pluginName]: CodeBlockElementSupport;
21
+ [CustomElementSupport.pluginName]: CustomElementSupport;
22
+ [ListElementSupport.pluginName]: ListElementSupport;
23
+ [DualContentModelElementSupport.pluginName]: DualContentModelElementSupport;
24
+ [HeadingElementSupport.pluginName]: HeadingElementSupport;
25
+ [ImageElementSupport.pluginName]: ImageElementSupport;
26
+ [MediaEmbedElementSupport.pluginName]: MediaEmbedElementSupport;
27
+ [ScriptElementSupport.pluginName]: ScriptElementSupport;
28
+ [StyleElementSupport.pluginName]: StyleElementSupport;
29
+ [TableElementSupport.pluginName]: TableElementSupport;
30
+ [HorizontalLineElementSupport.pluginName]: HorizontalLineElementSupport;
31
+ [HtmlComment.pluginName]: HtmlComment;
32
+ [FullPage.pluginName]: FullPage;
33
+ [EmptyBlock.pluginName]: EmptyBlock;
34
+ }
35
35
  }
@@ -1,28 +1,28 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module html-support/converters
7
- */
8
- import type { Editor } from '@ckeditor/ckeditor5-core';
9
- import type { ViewAttributeElement, DowncastConversionApi, DowncastDispatcher, ViewDowncastWriter, ModelElement, DowncastElementCreatorFunction, UpcastConversionApi, UpcastDispatcher, ViewElement } from '@ckeditor/ckeditor5-engine';
10
- import { type DataFilter } from './datafilter.js';
11
- import type { HtmlSupportDataSchemaBlockElementDefinition, HtmlSupportDataSchemaDefinition, HtmlSupportDataSchemaInlineElementDefinition } from './dataschema.js';
6
+ * @module html-support/converters
7
+ */
8
+ import type { Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { ViewAttributeElement, DowncastConversionApi, DowncastDispatcher, ViewDowncastWriter, ModelElement, DowncastElementCreatorFunction, UpcastConversionApi, UpcastDispatcher, ViewElement } from "@ckeditor/ckeditor5-engine";
10
+ import { type DataFilter } from "./datafilter.js";
11
+ import type { HtmlSupportDataSchemaBlockElementDefinition, HtmlSupportDataSchemaDefinition, HtmlSupportDataSchemaInlineElementDefinition } from "./dataschema.js";
12
12
  /**
13
- * View-to-model conversion helper for object elements.
14
- *
15
- * Preserves object element content in `htmlContent` attribute.
16
- *
17
- * @returns Returns a conversion callback.
18
- * @internal
13
+ * View-to-model conversion helper for object elements.
14
+ *
15
+ * Preserves object element content in `htmlContent` attribute.
16
+ *
17
+ * @returns Returns a conversion callback.
18
+ * @internal
19
19
  */
20
20
  export declare function viewToModelObjectConverter({ model: modelName }: HtmlSupportDataSchemaDefinition): (viewElement: ViewElement, conversionApi: UpcastConversionApi) => ModelElement;
21
21
  /**
22
- * Conversion helper converting an object element to an HTML object widget.
23
- *
24
- * @returns Returns a conversion callback.
25
- * @internal
22
+ * Conversion helper converting an object element to an HTML object widget.
23
+ *
24
+ * @returns Returns a conversion callback.
25
+ * @internal
26
26
  */
27
27
  export declare function toObjectWidgetConverter(editor: Editor, { view: viewName, isInline }: HtmlSupportDataSchemaInlineElementDefinition): DowncastElementCreatorFunction;
28
28
  /**
@@ -32,39 +32,39 @@ export declare function toObjectWidgetConverter(editor: Editor, { view: viewName
32
32
  */
33
33
  export declare function createObjectView(viewName: string, modelElement: ModelElement, writer: ViewDowncastWriter): ViewElement;
34
34
  /**
35
- * View-to-attribute conversion helper preserving inline element attributes on `$text`.
36
- *
37
- * @returns Returns a conversion callback.
38
- * @internal
35
+ * View-to-attribute conversion helper preserving inline element attributes on `$text`.
36
+ *
37
+ * @returns Returns a conversion callback.
38
+ * @internal
39
39
  */
40
40
  export declare function viewToAttributeInlineConverter({ view: viewName, model: attributeKey, allowEmpty }: HtmlSupportDataSchemaInlineElementDefinition, dataFilter: DataFilter): (dispatcher: UpcastDispatcher) => void;
41
41
  /**
42
- * Conversion helper converting an empty inline model element to an HTML element or widget.
43
- *
44
- * @internal
45
- */
42
+ * Conversion helper converting an empty inline model element to an HTML element or widget.
43
+ *
44
+ * @internal
45
+ */
46
46
  export declare function emptyInlineModelElementToViewConverter({ model: attributeKey, view: viewName }: HtmlSupportDataSchemaInlineElementDefinition, asWidget?: boolean): DowncastElementCreatorFunction;
47
47
  /**
48
- * Attribute-to-view conversion helper applying attributes to view element preserved on `$text`.
49
- *
50
- * @returns Returns a conversion callback.
51
- * @internal
48
+ * Attribute-to-view conversion helper applying attributes to view element preserved on `$text`.
49
+ *
50
+ * @returns Returns a conversion callback.
51
+ * @internal
52
52
  */
53
53
  export declare function attributeToViewInlineConverter({ priority, view: viewName }: HtmlSupportDataSchemaInlineElementDefinition): (attributeValue: any, conversionApi: DowncastConversionApi) => ViewAttributeElement | undefined;
54
54
  /**
55
- * View-to-model conversion helper preserving allowed attributes on block element.
56
- *
57
- * All matched attributes will be preserved on `html*Attributes` attribute.
58
- *
59
- * @returns Returns a conversion callback.
60
- * @internal
55
+ * View-to-model conversion helper preserving allowed attributes on block element.
56
+ *
57
+ * All matched attributes will be preserved on `html*Attributes` attribute.
58
+ *
59
+ * @returns Returns a conversion callback.
60
+ * @internal
61
61
  */
62
62
  export declare function viewToModelBlockAttributeConverter({ view: viewName }: HtmlSupportDataSchemaBlockElementDefinition, dataFilter: DataFilter): (dispatcher: UpcastDispatcher) => void;
63
63
  /**
64
- * Model-to-view conversion helper applying attributes preserved in `html*Attributes` attribute
65
- * for block elements.
66
- *
67
- * @returns Returns a conversion callback.
68
- * @internal
64
+ * Model-to-view conversion helper applying attributes preserved in `html*Attributes` attribute
65
+ * for block elements.
66
+ *
67
+ * @returns Returns a conversion callback.
68
+ * @internal
69
69
  */
70
70
  export declare function modelToViewBlockAttributeConverter({ view: viewName, model: modelName }: HtmlSupportDataSchemaBlockElementDefinition): (dispatcher: DowncastDispatcher) => void;