@ckeditor/ckeditor5-enter 40.0.0 → 40.1.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/src/utils.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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 enter/utils
7
- */
8
- import type { Schema } from '@ckeditor/ckeditor5-engine';
9
- /**
10
- * Returns attributes that should be preserved on the enter keystroke.
11
- *
12
- * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties
13
- * {@link module:engine/model/schema~Schema#setAttributeProperties here}.
14
- *
15
- * @param schema Model's schema.
16
- * @param allAttributes Attributes to filter.
17
- */
18
- export declare function getCopyOnEnterAttributes(schema: Schema, allAttributes: Iterable<[string, unknown]>): IterableIterator<[string, unknown]>;
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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 enter/utils
7
+ */
8
+ import type { Schema } from '@ckeditor/ckeditor5-engine';
9
+ /**
10
+ * Returns attributes that should be preserved on the enter keystroke.
11
+ *
12
+ * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties
13
+ * {@link module:engine/model/schema~Schema#setAttributeProperties here}.
14
+ *
15
+ * @param schema Model's schema.
16
+ * @param allAttributes Attributes to filter.
17
+ */
18
+ export declare function getCopyOnEnterAttributes(schema: Schema, allAttributes: Iterable<[string, unknown]>): IterableIterator<[string, unknown]>;
package/src/utils.js CHANGED
@@ -1,20 +1,20 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- * Returns attributes that should be preserved on the enter keystroke.
7
- *
8
- * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties
9
- * {@link module:engine/model/schema~Schema#setAttributeProperties here}.
10
- *
11
- * @param schema Model's schema.
12
- * @param allAttributes Attributes to filter.
13
- */
14
- export function* getCopyOnEnterAttributes(schema, allAttributes) {
15
- for (const attribute of allAttributes) {
16
- if (attribute && schema.getAttributeProperties(attribute[0]).copyOnEnter) {
17
- yield attribute;
18
- }
19
- }
20
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * Returns attributes that should be preserved on the enter keystroke.
7
+ *
8
+ * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties
9
+ * {@link module:engine/model/schema~Schema#setAttributeProperties here}.
10
+ *
11
+ * @param schema Model's schema.
12
+ * @param allAttributes Attributes to filter.
13
+ */
14
+ export function* getCopyOnEnterAttributes(schema, allAttributes) {
15
+ for (const attribute of allAttributes) {
16
+ if (attribute && schema.getAttributeProperties(attribute[0]).copyOnEnter) {
17
+ yield attribute;
18
+ }
19
+ }
20
+ }