@ckeditor/ckeditor5-html-support 38.2.0-alpha.0 → 38.2.0-alpha.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.
Files changed (43) hide show
  1. package/build/html-support.js +1 -1
  2. package/package.json +2 -2
  3. package/src/augmentation.d.ts +1 -1
  4. package/src/converters.d.ts +9 -5
  5. package/src/converters.js +42 -11
  6. package/src/datafilter.d.ts +26 -7
  7. package/src/datafilter.js +71 -12
  8. package/src/dataschema.d.ts +6 -2
  9. package/src/dataschema.js +3 -3
  10. package/src/fullpage.d.ts +1 -1
  11. package/src/fullpage.js +3 -3
  12. package/src/generalhtmlsupport.d.ts +14 -14
  13. package/src/generalhtmlsupport.js +17 -14
  14. package/src/generalhtmlsupportconfig.d.ts +13 -3
  15. package/src/htmlcomment.d.ts +2 -2
  16. package/src/htmlcomment.js +2 -2
  17. package/src/htmlpagedataprocessor.d.ts +1 -1
  18. package/src/htmlpagedataprocessor.js +1 -1
  19. package/src/index.d.ts +18 -18
  20. package/src/index.js +7 -7
  21. package/src/integrations/codeblock.d.ts +2 -2
  22. package/src/integrations/codeblock.js +3 -3
  23. package/src/integrations/customelement.d.ts +3 -3
  24. package/src/integrations/customelement.js +5 -5
  25. package/src/integrations/documentlist.d.ts +2 -2
  26. package/src/integrations/documentlist.js +3 -3
  27. package/src/integrations/dualcontent.d.ts +2 -2
  28. package/src/integrations/dualcontent.js +5 -5
  29. package/src/integrations/heading.d.ts +3 -3
  30. package/src/integrations/heading.js +3 -3
  31. package/src/integrations/image.d.ts +2 -2
  32. package/src/integrations/image.js +4 -4
  33. package/src/integrations/integrationutils.d.ts +1 -1
  34. package/src/integrations/mediaembed.d.ts +2 -2
  35. package/src/integrations/mediaembed.js +5 -5
  36. package/src/integrations/script.d.ts +2 -2
  37. package/src/integrations/script.js +3 -3
  38. package/src/integrations/style.d.ts +2 -2
  39. package/src/integrations/style.js +3 -3
  40. package/src/integrations/table.d.ts +2 -2
  41. package/src/integrations/table.js +4 -4
  42. package/src/schemadefinitions.d.ts +1 -1
  43. package/src/utils.d.ts +1 -1
package/src/datafilter.js CHANGED
@@ -5,13 +5,13 @@
5
5
  /**
6
6
  * @module html-support/datafilter
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { Matcher } from 'ckeditor5/src/engine';
10
- import { CKEditorError, priorities, isValidAttributeName } from 'ckeditor5/src/utils';
11
- import { Widget } from 'ckeditor5/src/widget';
12
- import { viewToModelObjectConverter, toObjectWidgetConverter, createObjectView, viewToAttributeInlineConverter, attributeToViewInlineConverter, viewToModelBlockAttributeConverter, modelToViewBlockAttributeConverter } from './converters';
13
- import { default as DataSchema } from './dataschema';
14
- import { getHtmlAttributeName } from './utils';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { Matcher } from 'ckeditor5/src/engine.js';
10
+ import { CKEditorError, priorities, isValidAttributeName } from 'ckeditor5/src/utils.js';
11
+ import { Widget } from 'ckeditor5/src/widget.js';
12
+ import { viewToModelObjectConverter, toObjectWidgetConverter, createObjectView, viewToAttributeInlineConverter, attributeToViewInlineConverter, emptyInlineModelElementToViewConverter, viewToModelBlockAttributeConverter, modelToViewBlockAttributeConverter } from './converters.js';
13
+ import { default as DataSchema } from './dataschema.js';
14
+ import { getHtmlAttributeName } from './utils.js';
15
15
  import { isPlainObject, pull as removeItemFromArray } from 'lodash-es';
16
16
  import '../theme/datafilter.css';
17
17
  /**
@@ -112,6 +112,18 @@ export default class DataFilter extends Plugin {
112
112
  }
113
113
  }
114
114
  }
115
+ /**
116
+ * Load a configuration of one or many elements, where when empty should be allowed.
117
+ *
118
+ * **Note**: It modifies DataSchema so must be loaded before registering filtering rules.
119
+ *
120
+ * @param config Configuration of elements that should be preserved even if empty.
121
+ */
122
+ loadAllowedEmptyElementsConfig(config) {
123
+ for (const elementName of config) {
124
+ this.allowEmptyElement(elementName);
125
+ }
126
+ }
115
127
  /**
116
128
  * Allow the given element in the editor context.
117
129
  *
@@ -142,6 +154,23 @@ export default class DataFilter extends Plugin {
142
154
  this._disallowedElements.add(definition.view);
143
155
  }
144
156
  }
157
+ /**
158
+ * Allow the given empty element in the editor context.
159
+ *
160
+ * This method will only allow elements described by the {@link module:html-support/dataschema~DataSchema} used
161
+ * to create data filter.
162
+ *
163
+ * **Note**: It modifies DataSchema so must be called before registering filtering rules.
164
+ *
165
+ * @param viewName String or regular expression matching view name.
166
+ */
167
+ allowEmptyElement(viewName) {
168
+ for (const definition of this._dataSchema.getDefinitionsForView(viewName, true)) {
169
+ if (definition.isInline) {
170
+ this._dataSchema.extendInlineElement({ ...definition, allowEmpty: true });
171
+ }
172
+ }
173
+ }
145
174
  /**
146
175
  * Allow the given attributes for view element allowed by {@link #allowElement} method.
147
176
  *
@@ -514,6 +543,36 @@ export default class DataFilter extends Plugin {
514
543
  model: attributeKey,
515
544
  view: attributeToViewInlineConverter(definition)
516
545
  });
546
+ if (!definition.allowEmpty) {
547
+ return;
548
+ }
549
+ schema.setAttributeProperties(attributeKey, { copyFromObject: false });
550
+ if (!schema.isRegistered('htmlEmptyElement')) {
551
+ schema.register('htmlEmptyElement', {
552
+ inheritAllFrom: '$inlineObject'
553
+ });
554
+ }
555
+ editor.data.htmlProcessor.domConverter.registerInlineObjectMatcher(element => {
556
+ // Element must be empty and have any attribute.
557
+ if (element.name == definition.view &&
558
+ element.isEmpty &&
559
+ Array.from(element.getAttributeKeys()).length) {
560
+ return {
561
+ name: true
562
+ };
563
+ }
564
+ return null;
565
+ });
566
+ conversion.for('editingDowncast')
567
+ .elementToElement({
568
+ model: 'htmlEmptyElement',
569
+ view: emptyInlineModelElementToViewConverter(definition, true)
570
+ });
571
+ conversion.for('dataDowncast')
572
+ .elementToElement({
573
+ model: 'htmlEmptyElement',
574
+ view: emptyInlineModelElementToViewConverter(definition)
575
+ });
517
576
  }
518
577
  }
519
578
  /**
@@ -647,15 +706,15 @@ function splitPattern(pattern, attributeName) {
647
706
  */
648
707
  function splitRules(rules) {
649
708
  const { name, attributes, classes, styles } = rules;
650
- const splittedRules = [];
709
+ const splitRules = [];
651
710
  if (attributes) {
652
- splittedRules.push(...splitPattern({ name, attributes }, 'attributes'));
711
+ splitRules.push(...splitPattern({ name, attributes }, 'attributes'));
653
712
  }
654
713
  if (classes) {
655
- splittedRules.push(...splitPattern({ name, classes }, 'classes'));
714
+ splitRules.push(...splitPattern({ name, classes }, 'classes'));
656
715
  }
657
716
  if (styles) {
658
- splittedRules.push(...splitPattern({ name, styles }, 'styles'));
717
+ splitRules.push(...splitPattern({ name, styles }, 'styles'));
659
718
  }
660
- return splittedRules;
719
+ return splitRules;
661
720
  }
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module html-support/dataschema
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import type { AttributeProperties, SchemaItemDefinition } from 'ckeditor5/src/engine';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import type { AttributeProperties, SchemaItemDefinition } from 'ckeditor5/src/engine.js';
10
10
  /**
11
11
  * Holds representation of the extended HTML document type definitions to be used by the
12
12
  * editor in HTML support.
@@ -176,4 +176,8 @@ export interface DataSchemaInlineElementDefinition extends DataSchemaDefinition
176
176
  * in the `htmlTbodyAttributes` model attribute of the `table` model element.
177
177
  */
178
178
  appliesToBlock?: boolean | string;
179
+ /**
180
+ * Indicates that an element should be preserved even if it has no content.
181
+ */
182
+ allowEmpty?: boolean;
179
183
  }
package/src/dataschema.js CHANGED
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module html-support/dataschema
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { toArray } from 'ckeditor5/src/utils';
10
- import defaultConfig from './schemadefinitions';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { toArray } from 'ckeditor5/src/utils.js';
10
+ import defaultConfig from './schemadefinitions.js';
11
11
  import { mergeWith } from 'lodash-es';
12
12
  /**
13
13
  * Holds representation of the extended HTML document type definitions to be used by the
package/src/fullpage.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module html-support/fullpage
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
9
  /**
10
10
  * The full page editing feature. It preserves the whole HTML page in the editor data.
11
11
  */
package/src/fullpage.js CHANGED
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module html-support/fullpage
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { UpcastWriter } from 'ckeditor5/src/engine';
10
- import HtmlPageDataProcessor from './htmlpagedataprocessor';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { UpcastWriter } from 'ckeditor5/src/engine.js';
10
+ import HtmlPageDataProcessor from './htmlpagedataprocessor.js';
11
11
  /**
12
12
  * The full page editing feature. It preserves the whole HTML page in the editor data.
13
13
  */
@@ -5,20 +5,20 @@
5
5
  /**
6
6
  * @module html-support/generalhtmlsupport
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { type ArrayOrItem } from 'ckeditor5/src/utils';
10
- import DataFilter from './datafilter';
11
- import CodeBlockElementSupport from './integrations/codeblock';
12
- import DualContentModelElementSupport from './integrations/dualcontent';
13
- import HeadingElementSupport from './integrations/heading';
14
- import ImageElementSupport from './integrations/image';
15
- import MediaEmbedElementSupport from './integrations/mediaembed';
16
- import ScriptElementSupport from './integrations/script';
17
- import TableElementSupport from './integrations/table';
18
- import StyleElementSupport from './integrations/style';
19
- import DocumentListElementSupport from './integrations/documentlist';
20
- import CustomElementSupport from './integrations/customelement';
21
- import type { Selectable } from 'ckeditor5/src/engine';
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 DocumentListElementSupport from './integrations/documentlist.js';
20
+ import CustomElementSupport from './integrations/customelement.js';
21
+ import type { Selectable } from 'ckeditor5/src/engine.js';
22
22
  /**
23
23
  * The General HTML Support feature.
24
24
  *
@@ -5,20 +5,20 @@
5
5
  /**
6
6
  * @module html-support/generalhtmlsupport
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { toArray } from 'ckeditor5/src/utils';
10
- import DataFilter from './datafilter';
11
- import CodeBlockElementSupport from './integrations/codeblock';
12
- import DualContentModelElementSupport from './integrations/dualcontent';
13
- import HeadingElementSupport from './integrations/heading';
14
- import ImageElementSupport from './integrations/image';
15
- import MediaEmbedElementSupport from './integrations/mediaembed';
16
- import ScriptElementSupport from './integrations/script';
17
- import TableElementSupport from './integrations/table';
18
- import StyleElementSupport from './integrations/style';
19
- import DocumentListElementSupport from './integrations/documentlist';
20
- import CustomElementSupport from './integrations/customelement';
21
- import { getHtmlAttributeName, modifyGhsAttribute } from './utils';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { toArray } 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 DocumentListElementSupport from './integrations/documentlist.js';
20
+ import CustomElementSupport from './integrations/customelement.js';
21
+ import { getHtmlAttributeName, modifyGhsAttribute } from './utils.js';
22
22
  /**
23
23
  * The General HTML Support feature.
24
24
  *
@@ -56,6 +56,9 @@ export default class GeneralHtmlSupport extends Plugin {
56
56
  init() {
57
57
  const editor = this.editor;
58
58
  const dataFilter = editor.plugins.get(DataFilter);
59
+ // Load the allowed empty inline elements' configuration.
60
+ // Note that this modifies DataSchema so must be loaded before registering filtering rules.
61
+ dataFilter.loadAllowedEmptyElementsConfig(editor.config.get('htmlSupport.allowEmpty') || []);
59
62
  // Load the filtering configuration.
60
63
  dataFilter.loadAllowedConfig(editor.config.get('htmlSupport.allow') || []);
61
64
  dataFilter.loadDisallowedConfig(editor.config.get('htmlSupport.disallow') || []);
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module html-support/generalhtmlsupportconfig
7
7
  */
8
- import type { MatcherPattern } from 'ckeditor5/src/engine';
8
+ import type { MatcherObjectPattern } from 'ckeditor5/src/engine.js';
9
9
  /**
10
10
  * The configuration of the General HTML Support feature.
11
11
  * The option is used by the {@link module:html-support/generalhtmlsupport~GeneralHtmlSupport} feature.
@@ -46,7 +46,7 @@ export interface GeneralHtmlSupportConfig {
46
46
  * ];
47
47
  * ```
48
48
  */
49
- allow?: Array<MatcherPattern>;
49
+ allow?: Array<MatcherObjectPattern>;
50
50
  /**
51
51
  * The configuration of disallowed content rules used by General HTML Support.
52
52
  *
@@ -63,5 +63,15 @@ export interface GeneralHtmlSupportConfig {
63
63
  * ];
64
64
  * ```
65
65
  */
66
- disallow?: Array<MatcherPattern>;
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>;
67
77
  }
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module html-support/htmlcomment
7
7
  */
8
- import type { Position, Range } from 'ckeditor5/src/engine';
9
- import { Plugin } from 'ckeditor5/src/core';
8
+ import type { Position, Range } from 'ckeditor5/src/engine.js';
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
10
  /**
11
11
  * The HTML comment feature. It preserves the HTML comments (`<!-- -->`) in the editor data.
12
12
  *
@@ -2,8 +2,8 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import { uid } from 'ckeditor5/src/utils';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import { uid } from 'ckeditor5/src/utils.js';
7
7
  /**
8
8
  * The HTML comment feature. It preserves the HTML comments (`<!-- -->`) in the editor data.
9
9
  *
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module html-support/htmlpagedataprocessor
7
7
  */
8
- import { HtmlDataProcessor, type ViewDocumentFragment } from 'ckeditor5/src/engine';
8
+ import { HtmlDataProcessor, type ViewDocumentFragment } from 'ckeditor5/src/engine.js';
9
9
  /**
10
10
  * The full page HTML data processor class.
11
11
  * This data processor implementation uses HTML as input and output data.
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module html-support/htmlpagedataprocessor
7
7
  */
8
- import { HtmlDataProcessor, UpcastWriter } from 'ckeditor5/src/engine';
8
+ import { HtmlDataProcessor, UpcastWriter } from 'ckeditor5/src/engine.js';
9
9
  /**
10
10
  * The full page HTML data processor class.
11
11
  * This data processor implementation uses HTML as input and output data.
package/src/index.d.ts CHANGED
@@ -5,21 +5,21 @@
5
5
  /**
6
6
  * @module html-support
7
7
  */
8
- export { default as GeneralHtmlSupport } from './generalhtmlsupport';
9
- export { default as DataFilter } from './datafilter';
10
- export { default as DataSchema, type DataSchemaBlockElementDefinition } from './dataschema';
11
- export { default as HtmlComment } from './htmlcomment';
12
- export { default as FullPage } from './fullpage';
13
- export { default as HtmlPageDataProcessor } from './htmlpagedataprocessor';
14
- export type { GeneralHtmlSupportConfig } from './generalhtmlsupportconfig';
15
- export type { default as CodeBlockElementSupport } from './integrations/codeblock';
16
- export type { default as CustomElementSupport } from './integrations/customelement';
17
- export type { default as DocumentListElementSupport } from './integrations/documentlist';
18
- export type { default as DualContentModelElementSupport } from './integrations/dualcontent';
19
- export type { default as HeadingElementSupport } from './integrations/heading';
20
- export type { default as ImageElementSupport } from './integrations/image';
21
- export type { default as MediaEmbedElementSupport } from './integrations/mediaembed';
22
- export type { default as ScriptElementSupport } from './integrations/script';
23
- export type { default as StyleElementSupport } from './integrations/style';
24
- export type { default as TableElementSupport } from './integrations/table';
25
- import './augmentation';
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 DocumentListElementSupport } from './integrations/documentlist.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';
package/src/index.js CHANGED
@@ -5,10 +5,10 @@
5
5
  /**
6
6
  * @module html-support
7
7
  */
8
- export { default as GeneralHtmlSupport } from './generalhtmlsupport';
9
- export { default as DataFilter } from './datafilter';
10
- export { default as DataSchema } from './dataschema';
11
- export { default as HtmlComment } from './htmlcomment';
12
- export { default as FullPage } from './fullpage';
13
- export { default as HtmlPageDataProcessor } from './htmlpagedataprocessor';
14
- import './augmentation';
8
+ export { default as GeneralHtmlSupport } from './generalhtmlsupport.js';
9
+ export { default as DataFilter } from './datafilter.js';
10
+ export { default as DataSchema } 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
+ import './augmentation.js';
@@ -2,8 +2,8 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import DataFilter from '../datafilter';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import DataFilter from '../datafilter.js';
7
7
  /**
8
8
  * Provides the General HTML Support integration with {@link module:code-block/codeblock~CodeBlock Code Block} feature.
9
9
  */
@@ -2,9 +2,9 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import { updateViewAttributes } from '../utils';
7
- import DataFilter from '../datafilter';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import { updateViewAttributes } from '../utils.js';
7
+ import DataFilter from '../datafilter.js';
8
8
  /**
9
9
  * Provides the General HTML Support integration with {@link module:code-block/codeblock~CodeBlock Code Block} feature.
10
10
  */
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module html-support/integrations/customelement
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataSchema from '../dataschema';
10
- import DataFilter from '../datafilter';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataSchema from '../dataschema.js';
10
+ import DataFilter from '../datafilter.js';
11
11
  /**
12
12
  * Provides the General HTML Support for custom elements (not registered in the {@link module:html-support/dataschema~DataSchema}).
13
13
  */
@@ -6,11 +6,11 @@
6
6
  * @module html-support/integrations/customelement
7
7
  */
8
8
  /* globals document */
9
- import { Plugin } from 'ckeditor5/src/core';
10
- import { UpcastWriter } from 'ckeditor5/src/engine';
11
- import DataSchema from '../dataschema';
12
- import DataFilter from '../datafilter';
13
- import { setViewAttributes } from '../utils';
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import { UpcastWriter } from 'ckeditor5/src/engine.js';
11
+ import DataSchema from '../dataschema.js';
12
+ import DataFilter from '../datafilter.js';
13
+ import { setViewAttributes } from '../utils.js';
14
14
  /**
15
15
  * Provides the General HTML Support for custom elements (not registered in the {@link module:html-support/dataschema~DataSchema}).
16
16
  */
@@ -2,8 +2,8 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import DataFilter from '../datafilter';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import DataFilter from '../datafilter.js';
7
7
  /**
8
8
  * Provides the General HTML Support integration with the {@link module:list/documentlist~DocumentList Document List} feature.
9
9
  */
@@ -6,9 +6,9 @@
6
6
  * @module html-support/integrations/documentlist
7
7
  */
8
8
  import { isEqual } from 'lodash-es';
9
- import { Plugin } from 'ckeditor5/src/core';
10
- import { getHtmlAttributeName, setViewAttributes } from '../utils';
11
- import DataFilter from '../datafilter';
9
+ import { Plugin } from 'ckeditor5/src/core.js';
10
+ import { getHtmlAttributeName, setViewAttributes } from '../utils.js';
11
+ import DataFilter from '../datafilter.js';
12
12
  /**
13
13
  * Provides the General HTML Support integration with the {@link module:list/documentlist~DocumentList Document List} feature.
14
14
  */
@@ -2,8 +2,8 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import DataFilter from '../datafilter';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import DataFilter from '../datafilter.js';
7
7
  /**
8
8
  * Provides the General HTML Support integration for elements which can behave like sectioning element (e.g. article) or
9
9
  * element accepting only inline content (e.g. paragraph).
@@ -2,11 +2,11 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Plugin } from 'ckeditor5/src/core';
6
- import { priorities } from 'ckeditor5/src/utils';
7
- import { modelToViewBlockAttributeConverter, viewToModelBlockAttributeConverter } from '../converters';
8
- import DataFilter from '../datafilter';
9
- import { getHtmlAttributeName } from '../utils';
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import { priorities } from 'ckeditor5/src/utils.js';
7
+ import { modelToViewBlockAttributeConverter, viewToModelBlockAttributeConverter } from '../converters.js';
8
+ import DataFilter from '../datafilter.js';
9
+ import { getHtmlAttributeName } from '../utils.js';
10
10
  /**
11
11
  * Provides the General HTML Support integration for elements which can behave like sectioning element (e.g. article) or
12
12
  * element accepting only inline content (e.g. paragraph).
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module html-support/integrations/heading
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { Enter } from 'ckeditor5/src/enter';
10
- import DataSchema from '../dataschema';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { Enter } from 'ckeditor5/src/enter.js';
10
+ import DataSchema from '../dataschema.js';
11
11
  /**
12
12
  * Provides the General HTML Support integration with {@link module:heading/heading~Heading Heading} feature.
13
13
  */
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module html-support/integrations/heading
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { Enter } from 'ckeditor5/src/enter';
10
- import DataSchema from '../dataschema';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { Enter } from 'ckeditor5/src/enter.js';
10
+ import DataSchema from '../dataschema.js';
11
11
  /**
12
12
  * Provides the General HTML Support integration with {@link module:heading/heading~Heading Heading} feature.
13
13
  */
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module html-support/integrations/image
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataFilter from '../datafilter';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataFilter from '../datafilter.js';
10
10
  /**
11
11
  * Provides the General HTML Support integration with the {@link module:image/image~Image Image} feature.
12
12
  */
@@ -5,10 +5,10 @@
5
5
  /**
6
6
  * @module html-support/integrations/image
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataFilter from '../datafilter';
10
- import { setViewAttributes, updateViewAttributes } from '../utils';
11
- import { getDescendantElement } from './integrationutils';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataFilter from '../datafilter.js';
10
+ import { setViewAttributes, updateViewAttributes } from '../utils.js';
11
+ import { getDescendantElement } from './integrationutils.js';
12
12
  /**
13
13
  * Provides the General HTML Support integration with the {@link module:image/image~Image Image} feature.
14
14
  */
@@ -2,7 +2,7 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine';
5
+ import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';
6
6
  /**
7
7
  * @module html-support/integrations/integrationutils
8
8
  */
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module html-support/integrations/mediaembed
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataFilter from '../datafilter';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataFilter from '../datafilter.js';
10
10
  /**
11
11
  * Provides the General HTML Support integration with {@link module:media-embed/mediaembed~MediaEmbed Media Embed} feature.
12
12
  */
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * @module html-support/integrations/mediaembed
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataFilter from '../datafilter';
10
- import DataSchema from '../dataschema';
11
- import { updateViewAttributes, getHtmlAttributeName } from '../utils';
12
- import { getDescendantElement } from './integrationutils';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataFilter from '../datafilter.js';
10
+ import DataSchema from '../dataschema.js';
11
+ import { updateViewAttributes, getHtmlAttributeName } from '../utils.js';
12
+ import { getDescendantElement } from './integrationutils.js';
13
13
  /**
14
14
  * Provides the General HTML Support integration with {@link module:media-embed/mediaembed~MediaEmbed Media Embed} feature.
15
15
  */
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module html-support/integrations/script
7
7
  */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import DataFilter from '../datafilter';
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import DataFilter from '../datafilter.js';
10
10
  /**
11
11
  * Provides the General HTML Support for `script` elements.
12
12
  */