@ckeditor/ckeditor5-paste-from-office-enhanced 41.3.0 → 41.4.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/build/paste-from-office-enhanced.js +1 -1
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +23 -0
- package/dist/types/augmentation.d.ts +14 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/normalizers/inliner/msofficestylesinliner.d.ts +46 -0
- package/dist/types/normalizers/inliner/utils.d.ts +132 -0
- package/dist/types/normalizers/propagator/msofficeinlinestylepropagator.d.ts +47 -0
- package/dist/types/normalizers/propagator/utils.d.ts +101 -0
- package/dist/types/pastefromofficeenhanced.d.ts +33 -0
- package/dist/types/pastefromofficeenhancedinliner.d.ts +33 -0
- package/dist/types/pastefromofficeenhancedpropagator.d.ts +40 -0
- package/dist/types/utils.d.ts +15 -0
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/normalizers/inliner/msofficestylesinliner.js +1 -1
- package/src/normalizers/inliner/utils.js +1 -1
- package/src/normalizers/propagator/msofficeinlinestylepropagator.js +1 -1
- package/src/normalizers/propagator/utils.js +1 -1
- package/src/pastefromofficeenhanced.js +1 -1
- package/src/pastefromofficeenhancedinliner.js +1 -1
- package/src/pastefromofficeenhancedpropagator.js +1 -1
- package/src/utils.js +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import { type NormalizerData, MSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
|
|
10
|
+
/**
|
|
11
|
+
* A normalizer that inlines styles passed along the content from MS Office.
|
|
12
|
+
*
|
|
13
|
+
* Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
|
|
14
|
+
* plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
15
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
16
|
+
*
|
|
17
|
+
* This particular normalizer turns a pasted content such as:
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <style>
|
|
21
|
+
* p { margin-top: 10px }
|
|
22
|
+
* .foo { font-family: Arial }
|
|
23
|
+
* <style>
|
|
24
|
+
* <p class="foo">Foo</p>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* into:
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <style>
|
|
31
|
+
* p { margin-top: 10px }
|
|
32
|
+
* .foo { font-family: Arial }
|
|
33
|
+
* <style>
|
|
34
|
+
* <p class="foo" style="margin-top: 10px; font-family: Arial">Foo</p>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export default class MSOfficeStylesInliner extends MSWordNormalizer {
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
execute(data: NormalizerData): void;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
isActive(htmlString: string): boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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 paste-from-office-enhanced/normalizers/msofficestylesinliner/utils
|
|
11
|
+
*/
|
|
12
|
+
import { type ViewElement } from 'ckeditor5/src/engine.js';
|
|
13
|
+
type StyleSelector = string;
|
|
14
|
+
type CSSStyleDefinitions = Record<string, string>;
|
|
15
|
+
type ExtractedStyles = Record<StyleSelector, CSSStyleDefinitions>;
|
|
16
|
+
type ExpandedStyles = Map<ParsedCSSSelector, CSSStyleDefinitions>;
|
|
17
|
+
type ParsedCSSSelector = {
|
|
18
|
+
tagName?: StyleSelector;
|
|
19
|
+
className?: StyleSelector;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Returns style definitions that match given element.
|
|
23
|
+
*
|
|
24
|
+
* @param element
|
|
25
|
+
* @param expandedStyles
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function getMatchingStyles(element: ViewElement, expandedStyles: ExpandedStyles): ExpandedStyles;
|
|
29
|
+
/**
|
|
30
|
+
* Converts CSSStyleSheets into a simple object format:
|
|
31
|
+
*
|
|
32
|
+
* ```js
|
|
33
|
+
* {
|
|
34
|
+
* 'p, p.foo': {
|
|
35
|
+
* 'font-family': 'Arial'
|
|
36
|
+
* },
|
|
37
|
+
* 'td': {
|
|
38
|
+
* 'background': 'red'
|
|
39
|
+
* },
|
|
40
|
+
* // ...
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
* @param styles
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractStyles(styles: Array<CSSStyleSheet>): ExtractedStyles;
|
|
47
|
+
/**
|
|
48
|
+
* Expands styles object with complex selector into a map of unique parsed selectors and style definitions.
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* const styles = {
|
|
52
|
+
* 'p, p.foo': {
|
|
53
|
+
* 'font-family': 'Arial'
|
|
54
|
+
* },
|
|
55
|
+
* 'td': {
|
|
56
|
+
* 'background': 'red'
|
|
57
|
+
* },
|
|
58
|
+
* // ...
|
|
59
|
+
* }
|
|
60
|
+
*
|
|
61
|
+
* expandStyles( styles );
|
|
62
|
+
*
|
|
63
|
+
* {
|
|
64
|
+
* { tagName: 'p' }: {
|
|
65
|
+
* 'font-family': 'Arial'
|
|
66
|
+
* },
|
|
67
|
+
* { tagName: 'p', className: 'foo }: {
|
|
68
|
+
* 'font-family': 'Arial'
|
|
69
|
+
* },
|
|
70
|
+
* { tagName: 'td' }: {
|
|
71
|
+
* 'background': 'red'
|
|
72
|
+
* },
|
|
73
|
+
* // ...
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
* @param styles
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
export declare function expandStyles(styles: ExtractedStyles): ExpandedStyles;
|
|
80
|
+
/**
|
|
81
|
+
* Converts a native CSSStyleDeclaration into a simple object.
|
|
82
|
+
*
|
|
83
|
+
* ```ts
|
|
84
|
+
* {
|
|
85
|
+
* 'font-family': 'Arial'
|
|
86
|
+
* 'background': 'red',
|
|
87
|
+
* // ...
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
* @param declaration
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
export declare function parseCSSStyleDeclaration(declaration: CSSStyleDeclaration): CSSStyleDefinitions;
|
|
94
|
+
/**
|
|
95
|
+
* Parses CSS selector into an array of objects with tagName and className properties.
|
|
96
|
+
*
|
|
97
|
+
* ```ts
|
|
98
|
+
* parseCSSSelector( 'p, p.foo' );
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* returns:
|
|
102
|
+
*
|
|
103
|
+
* ```ts
|
|
104
|
+
* [
|
|
105
|
+
* { tagName: 'p' },
|
|
106
|
+
* { tagName: 'p', className: 'foo' }
|
|
107
|
+
* ]
|
|
108
|
+
* ```
|
|
109
|
+
* @param selector
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
export declare function parseCSSSelector(selector: string): Array<ParsedCSSSelector>;
|
|
113
|
+
/**
|
|
114
|
+
* Flattens multiple style definitions considering their order to simulate a CSS cascade.
|
|
115
|
+
*
|
|
116
|
+
* ```ts
|
|
117
|
+
* flattenStyleDefinitions( [
|
|
118
|
+
* { 'font-family': 'Arial', 'margin-top': '1px', 'font-size': '10px' },
|
|
119
|
+
* { 'font-family': 'monospace', 'margin-top': '3px' }
|
|
120
|
+
* ] );
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* returns:
|
|
124
|
+
*
|
|
125
|
+
* ```ts
|
|
126
|
+
* { 'font-family': 'monospace', 'margin-top': '3px', 'font-size': '10px' }
|
|
127
|
+
* ```
|
|
128
|
+
* @param definitions
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
export declare function flattenStyleDefinitions(definitions: Array<CSSStyleDefinitions>): CSSStyleDefinitions;
|
|
132
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { type NormalizerData, MSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
|
|
10
|
+
/**
|
|
11
|
+
* A normalizer that propagates inline styles from block element into `span` element with style properties
|
|
12
|
+
* and/or creates an `HTML` structure based on early mentioned block element styles.
|
|
13
|
+
*
|
|
14
|
+
* Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
|
|
15
|
+
* plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
16
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
17
|
+
*
|
|
18
|
+
* This particular normalizer turns a pasted content such as:
|
|
19
|
+
*
|
|
20
|
+
* ```html
|
|
21
|
+
* <p style="color:red;font-size:10px;font-weight:bold;">
|
|
22
|
+
* foo
|
|
23
|
+
* </p>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* into:
|
|
27
|
+
*
|
|
28
|
+
* ```html
|
|
29
|
+
* <p>
|
|
30
|
+
* <span style="color:red;font-size:10px">
|
|
31
|
+
* <strong>
|
|
32
|
+
* foo
|
|
33
|
+
* </strong>
|
|
34
|
+
* </span>
|
|
35
|
+
* </p>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export default class MSOfficeInlineStylePropagator extends MSWordNormalizer {
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
execute(data: NormalizerData): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
isActive(htmlString: string): boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 paste-from-office-enhanced/normalizers/msofficeinlinestylepropagator/utils
|
|
11
|
+
*/
|
|
12
|
+
import type { UpcastWriter, ViewElement } from 'ckeditor5/src/engine.js';
|
|
13
|
+
/**
|
|
14
|
+
* The list of all `CSS` properties that need to be propagated.
|
|
15
|
+
*
|
|
16
|
+
* @protected
|
|
17
|
+
*/
|
|
18
|
+
export declare const CSS_PROPERTIES_TO_PROPAGATE: readonly ["color", "font-family", "font-size", "text-decoration", "text-decoration-line", "font-weight", "font-style", "vertical-align"];
|
|
19
|
+
/**
|
|
20
|
+
* The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
|
|
21
|
+
*
|
|
22
|
+
* It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
|
|
23
|
+
*
|
|
24
|
+
* @protected
|
|
25
|
+
*/
|
|
26
|
+
export declare const CSS_PROPERTIES_TO_BE_SPANS: readonly ["color", "font-family", "font-size"];
|
|
27
|
+
export type CSSPropertyValueAssertion = (value: string) => boolean;
|
|
28
|
+
export type CSSPropertyValueToElementNameMap = readonly [string | CSSPropertyValueAssertion, string];
|
|
29
|
+
/**
|
|
30
|
+
* The map of style to element propagate as a HTML elements
|
|
31
|
+
* (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
|
|
32
|
+
* or `font-weight` with the `bold` value is propagated to `<strong>`).
|
|
33
|
+
*
|
|
34
|
+
* @protected
|
|
35
|
+
*/
|
|
36
|
+
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: {
|
|
37
|
+
[key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether the given property should be propagated at all.
|
|
41
|
+
*
|
|
42
|
+
* @param property
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
export declare function isPropertyToBePropagated(property: string): property is typeof CSS_PROPERTIES_TO_PROPAGATE[number];
|
|
46
|
+
/**
|
|
47
|
+
* Checks whether the given property should be propagated as a span element.
|
|
48
|
+
*
|
|
49
|
+
* @param property
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export declare function isPropertyToBePropagatedAsSpan(property: string): property is typeof CSS_PROPERTIES_TO_BE_SPANS[number];
|
|
53
|
+
/**
|
|
54
|
+
* Checks whether the given property should be propagated as an HTML element.
|
|
55
|
+
*
|
|
56
|
+
* @param property
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
export declare function isPropertyToBePropagatedAsHTMLElement(property: string): property is keyof typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;
|
|
60
|
+
/**
|
|
61
|
+
* Collects a list of styles to propagate from a block element.
|
|
62
|
+
*
|
|
63
|
+
* @param element The source `ViewElement`.
|
|
64
|
+
* @returns List of valid CSS properties to propagate.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getStylePropertyNamesToPropagate(element: ViewElement): Array<typeof CSS_PROPERTIES_TO_PROPAGATE[number]>;
|
|
67
|
+
/**
|
|
68
|
+
* Executes styles propagation.
|
|
69
|
+
*
|
|
70
|
+
* @param element The source `ViewElement`.
|
|
71
|
+
* @param writer `UpcastWriter` instance.
|
|
72
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
73
|
+
*/
|
|
74
|
+
export declare function propagateStyleProperties(element: ViewElement, writer: UpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
75
|
+
/**
|
|
76
|
+
* Creates an `HTML` structure based on styles propagated from parent block element.
|
|
77
|
+
*
|
|
78
|
+
* @param element The source `ViewElement`.
|
|
79
|
+
* @param writer `UpcastWriter` instance.
|
|
80
|
+
* @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
|
|
81
|
+
*/
|
|
82
|
+
export declare function propagateStylesAsHTMLElements(element: ViewElement, writer: UpcastWriter, stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a `span` as a first child of the `element` with styles propagated from parent block element.
|
|
85
|
+
*
|
|
86
|
+
* @param element The source `ViewElement`.
|
|
87
|
+
* @param writer `UpcastWriter` instance.
|
|
88
|
+
* @param spanStyles List of styles properties to propagate.
|
|
89
|
+
*/
|
|
90
|
+
export declare function propagateStylesAsSpan(element: ViewElement, writer: UpcastWriter, spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>): void;
|
|
91
|
+
/**
|
|
92
|
+
* Collects and filters element styles into proper objects for further propagation.
|
|
93
|
+
*
|
|
94
|
+
* @param element The source `ViewElement`.
|
|
95
|
+
* @param propertiesToPropagate The array of style properties to propagate.
|
|
96
|
+
* @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getStylesToPropagate(element: ViewElement, propertiesToPropagate: Array<string>): {
|
|
99
|
+
spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
|
|
100
|
+
stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
|
|
101
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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 paste-from-office-enhanced/pastefromofficeenhanced
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
import PasteFromOfficeEnhancedInliner from './pastefromofficeenhancedinliner.js';
|
|
15
|
+
import PasteFromOfficeEnhancedPropagator from './pastefromofficeenhancedpropagator.js';
|
|
16
|
+
/**
|
|
17
|
+
* The Paste from Office Enhanced feature.
|
|
18
|
+
*
|
|
19
|
+
* Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
|
|
20
|
+
* and more efficient workflow.
|
|
21
|
+
*
|
|
22
|
+
* For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
|
|
23
|
+
*/
|
|
24
|
+
export default class PasteFromOfficeEnhanced extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "PasteFromOfficeEnhanced";
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get requires(): readonly ["PasteFromOffice", typeof PasteFromOfficeEnhancedInliner, typeof PasteFromOfficeEnhancedPropagator];
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 paste-from-office-enhanced/pastefromofficeenhancedinliner
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
|
|
15
|
+
*/
|
|
16
|
+
export default class PasteFromOfficeEnhancedInliner extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "PasteFromOfficeEnhancedInliner";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly ["PasteFromOffice"];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
init(): void;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
afterInit(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 paste-from-office-enhanced/pastefromofficeenhancedpropagator
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
|
|
15
|
+
* * `span` element with `style` properties,
|
|
16
|
+
* * `HTML` structures based block element styles.
|
|
17
|
+
*/
|
|
18
|
+
export default class PasteFromOfficeEnhancedPropagator extends Plugin {
|
|
19
|
+
licenseKey: string;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "PasteFromOfficeEnhancedPropagator";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get requires(): readonly ["PasteFromOffice"];
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
constructor(editor: Editor);
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
@@ -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
|
+
/**
|
|
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
|
+
* Check if content was pasted from MS Excel.
|
|
11
|
+
*
|
|
12
|
+
* @param html
|
|
13
|
+
* @returns True if content is pasted from MS Excel
|
|
14
|
+
*/
|
|
15
|
+
export declare function isMSExcelContent(html: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-paste-from-office-enhanced",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.4.0-alpha.0",
|
|
4
4
|
"description": "Enhanced paste from Office feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -22,14 +22,15 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "src/index.js",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"ckeditor5": "41.
|
|
26
|
-
"@ckeditor/ckeditor5-paste-from-office": "41.
|
|
25
|
+
"ckeditor5": "41.4.0-alpha.0",
|
|
26
|
+
"@ckeditor/ckeditor5-paste-from-office": "41.4.0-alpha.0"
|
|
27
27
|
},
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
29
29
|
"author": "CKSource (http://cksource.com/)",
|
|
30
30
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
31
31
|
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
32
32
|
"files": [
|
|
33
|
+
"dist",
|
|
33
34
|
"lang",
|
|
34
35
|
"src/**/*.js",
|
|
35
36
|
"src/**/*.d.ts",
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x312158,_0x550a1c){var _0x5c3721=_0x1a25,_0xd2d2c6=_0x312158();while(!![]){try{var _0x470599=-parseInt(_0x5c3721(0xa5))/0x1*(parseInt(_0x5c3721(0xad))/0x2)+-parseInt(_0x5c3721(0xa6))/0x3*(-parseInt(_0x5c3721(0xaf))/0x4)+parseInt(_0x5c3721(0xa4))/0x5*(parseInt(_0x5c3721(0xab))/0x6)+parseInt(_0x5c3721(0xb1))/0x7*(parseInt(_0x5c3721(0xac))/0x8)+-parseInt(_0x5c3721(0xb0))/0x9*(parseInt(_0x5c3721(0xa7))/0xa)+-parseInt(_0x5c3721(0xaa))/0xb*(parseInt(_0x5c3721(0xae))/0xc)+parseInt(_0x5c3721(0xa9))/0xd*(-parseInt(_0x5c3721(0xa8))/0xe);if(_0x470599===_0x550a1c)break;else _0xd2d2c6['push'](_0xd2d2c6['shift']());}catch(_0x58ec0a){_0xd2d2c6['push'](_0xd2d2c6['shift']());}}}(_0x1f87,0xa0d69));function _0x1f87(){var _0x37beab=['8681052qBiDtv','4210000pVOGId','27ATbuNi','203CtOekl','288505nEzfPr','68547BQBIqj','3rkaRBx','189480LgWwpg','1358cuiiiT','77909MySgxt','11jHmdzB','114UiXKrF','210392KbUZqS','26PNsWaG'];_0x1f87=function(){return _0x37beab;};return _0x1f87();}export{default as PasteFromOfficeEnhanced}from'./pastefromofficeenhanced.js';function _0x1a25(_0x5c87aa,_0x44e16c){var _0x1f87ab=_0x1f87();return _0x1a25=function(_0x1a25a3,_0x13bc0f){_0x1a25a3=_0x1a25a3-0xa4;var _0x13a5c9=_0x1f87ab[_0x1a25a3];return _0x13a5c9;},_0x1a25(_0x5c87aa,_0x44e16c);}import'./augmentation.js';
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2e56f1=_0x5314;(function(_0x3fe22f,_0x3f2590){const _0x5d71f3=_0x5314,_0x23c96a=_0x3fe22f();while(!![]){try{const _0x32c6f7=parseInt(_0x5d71f3(0xbc))/0x1*(-parseInt(_0x5d71f3(0xb5))/0x2)+-parseInt(_0x5d71f3(0xc0))/0x3+-parseInt(_0x5d71f3(0xb4))/0x4+-parseInt(_0x5d71f3(0xc1))/0x5+-parseInt(_0x5d71f3(0xb8))/0x6+parseInt(_0x5d71f3(0xb0))/0x7+parseInt(_0x5d71f3(0xba))/0x8*(parseInt(_0x5d71f3(0xad))/0x9);if(_0x32c6f7===_0x3f2590)break;else _0x23c96a['push'](_0x23c96a['shift']());}catch(_0x34bfdc){_0x23c96a['push'](_0x23c96a['shift']());}}}(_0x405a,0xc0c3d));import{UpcastWriter as _0x11817c}from'ckeditor5/src/engine.js';import{MSWordNormalizer as _0x464e12}from'@ckeditor/ckeditor5-paste-from-office';import{isMSExcelContent as _0x5d8629}from'../../utils.js';function _0x405a(){const _0x56c243=['2359086gDdjqG','5458625wKicFn','elementStart','size','9JgAQPa','setStyle','content','10893841poeaRX','isActive','type','_parsedData','972772UqCMTJ','36724dbFAYS','execute','hasStyle','8919852IAoAdo','values','26549088ROdemM','item','26LeaGBZ','document','from','createRangeIn'];_0x405a=function(){return _0x56c243;};return _0x405a();}function _0x5314(_0x51ef9c,_0x2420cc){const _0x405a7b=_0x405a();return _0x5314=function(_0x531487,_0x28004e){_0x531487=_0x531487-0xac;let _0x3fc3fa=_0x405a7b[_0x531487];return _0x3fc3fa;},_0x5314(_0x51ef9c,_0x2420cc);}import{extractStyles as _0x19b3a4,expandStyles as _0x588a35,getMatchingStyles as _0x1ba21,flattenStyleDefinitions as _0x352604}from'./utils.js';export default class u extends _0x464e12{[_0x2e56f1(0xb6)](_0x98f68c){const _0x44d37f=_0x2e56f1,{body:_0x5b88c7,styles:_0x2b9846}=_0x98f68c[_0x44d37f(0xb3)],_0x472e3b=new _0x11817c(_0x5b88c7[_0x44d37f(0xbd)]),_0x58ac05=_0x472e3b[_0x44d37f(0xbf)](_0x5b88c7),_0x67cfd7=_0x19b3a4(_0x2b9846),_0x24ebbc=_0x588a35(_0x67cfd7);for(const _0x44f0b6 of _0x58ac05){if(_0x44d37f(0xc2)!==_0x44f0b6[_0x44d37f(0xb2)])continue;const _0x2945f0=_0x1ba21(_0x44f0b6[_0x44d37f(0xbb)],_0x24ebbc);if(_0x2945f0[_0x44d37f(0xac)]){const _0x38b5c6=_0x352604(Array[_0x44d37f(0xbe)](_0x2945f0[_0x44d37f(0xb9)]()));for(const _0x3ed3f1 in _0x38b5c6){const _0x422484=_0x44f0b6[_0x44d37f(0xbb)];_0x422484[_0x44d37f(0xb7)](_0x3ed3f1)||_0x472e3b[_0x44d37f(0xae)](_0x3ed3f1,_0x38b5c6[_0x3ed3f1],_0x422484);}}}_0x98f68c[_0x44d37f(0xaf)]=_0x5b88c7;}[_0x2e56f1(0xb1)](_0x5f3124){const _0x17ef4d=_0x2e56f1;return super[_0x17ef4d(0xb1)](_0x5f3124)||_0x5d8629(_0x5f3124);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x2f3e95,_0x4d6c51){const _0x5ee3c4=_0x4b6d,_0x507686=_0x2f3e95();while(!![]){try{const _0x42eced=parseInt(_0x5ee3c4(0x7e))/0x1+-parseInt(_0x5ee3c4(0x8a))/0x2+parseInt(_0x5ee3c4(0x88))/0x3+parseInt(_0x5ee3c4(0x84))/0x4+-parseInt(_0x5ee3c4(0x96))/0x5*(parseInt(_0x5ee3c4(0x90))/0x6)+-parseInt(_0x5ee3c4(0x8b))/0x7+parseInt(_0x5ee3c4(0x8d))/0x8;if(_0x42eced===_0x4d6c51)break;else _0x507686['push'](_0x507686['shift']());}catch(_0x23fcfb){_0x507686['push'](_0x507686['shift']());}}}(_0x3276,0x59147));const S=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;export function getMatchingStyles(_0x7c29d,_0x1e3b6c){const _0x36f2e5=_0x4b6d,_0x34e3c=new Map();for(const [_0x3f2dfc,_0x431b53]of _0x1e3b6c){if(!_0x3f2dfc[_0x36f2e5(0x94)]&&!_0x3f2dfc[_0x36f2e5(0x85)])continue;const _0x2b8db4=!_0x3f2dfc[_0x36f2e5(0x94)]||_0x7c29d[_0x36f2e5(0x8c)]===_0x3f2dfc[_0x36f2e5(0x94)],_0xe93d4b=!_0x3f2dfc[_0x36f2e5(0x85)]||_0x7c29d[_0x36f2e5(0x87)](_0x3f2dfc[_0x36f2e5(0x85)]);_0x2b8db4&&_0xe93d4b&&_0x34e3c[_0x36f2e5(0x8f)](_0x3f2dfc,_0x431b53);}return _0x34e3c;}export function extractStyles(_0x5eabd4){const _0x15ea7c=_0x4b6d,_0x3e2f03={};for(const _0x3c60fc of _0x5eabd4)for(const _0x4195d4 of _0x3c60fc[_0x15ea7c(0x93)])if(_0x4195d4 instanceof CSSStyleRule){const _0x4cffd2=parseCSSStyleDeclaration(_0x4195d4[_0x15ea7c(0x97)]);_0x3e2f03[_0x4195d4[_0x15ea7c(0x80)]]=Object[_0x15ea7c(0x89)]({},_0x3e2f03[_0x4195d4[_0x15ea7c(0x80)]]||{},_0x4cffd2);}return _0x3e2f03;}function _0x4b6d(_0x3fdec4,_0x5b0da7){const _0x3276ab=_0x3276();return _0x4b6d=function(_0x4b6d03,_0x588728){_0x4b6d03=_0x4b6d03-0x7e;let _0xfed47c=_0x3276ab[_0x4b6d03];return _0xfed47c;},_0x4b6d(_0x3fdec4,_0x5b0da7);}function _0x3276(){const _0x1fb111=['hasClass','1380081YcnNZR','assign','1142058JzNPTi','3527846oTeccE','name','4204912bOYvYr','map','set','17106iPXzDO','length','getPropertyValue','cssRules','tagName','initial','290sXgfzK','style','236871Kebjja','trim','selectorText','groups','split','exec','1530896WwReuh','className','push'];_0x3276=function(){return _0x1fb111;};return _0x3276();}export function expandStyles(_0x139cca){const _0x129ecb=_0x4b6d,_0x4ea995=new Map();for(const _0x155ddb in _0x139cca){const _0x317110=parseCSSSelector(_0x155ddb),_0x3a536e=_0x139cca[_0x155ddb];for(const _0x2729fe of _0x317110)_0x4ea995[_0x129ecb(0x8f)](_0x2729fe,_0x3a536e);}return _0x4ea995;}export function parseCSSStyleDeclaration(_0x5d73ae){const _0x22c9f0=_0x4b6d,_0x3507a3={};for(let _0x2ed66a=0x0;_0x2ed66a<_0x5d73ae[_0x22c9f0(0x91)];_0x2ed66a++){const _0x413ce0=_0x5d73ae[_0x2ed66a],_0x328a37=_0x5d73ae[_0x22c9f0(0x92)](_0x413ce0);_0x22c9f0(0x95)!==_0x328a37&&(_0x3507a3[_0x413ce0]=_0x328a37);}return _0x3507a3;}export function parseCSSSelector(_0x3f2f54){const _0x4ee67c=_0x4b6d,_0x4d2154=_0x3f2f54[_0x4ee67c(0x82)](',')[_0x4ee67c(0x8e)](_0x334c65=>_0x334c65[_0x4ee67c(0x7f)]()),_0xffeb8f=[];for(const _0x31d576 of _0x4d2154){const _0x19b9a=S[_0x4ee67c(0x83)](_0x31d576);_0x19b9a&&_0xffeb8f[_0x4ee67c(0x86)](_0x19b9a[_0x4ee67c(0x81)]);}return _0xffeb8f;}export function flattenStyleDefinitions(_0x56629f){const _0x28e1d7=_0x4b6d,_0x295f9f={};for(const _0x2eb715 of _0x56629f)Object[_0x28e1d7(0x89)](_0x295f9f,_0x2eb715);return _0x295f9f;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2773aa=_0x4e39;(function(_0x210f62,_0x15d1f4){const _0x15d93b=_0x4e39,_0x4dbc20=_0x210f62();while(!![]){try{const _0x1f81be=parseInt(_0x15d93b(0xcd))/0x1*(parseInt(_0x15d93b(0xcb))/0x2)+-parseInt(_0x15d93b(0xd5))/0x3+parseInt(_0x15d93b(0xd8))/0x4*(parseInt(_0x15d93b(0xce))/0x5)+-parseInt(_0x15d93b(0xd9))/0x6+-parseInt(_0x15d93b(0xd3))/0x7*(-parseInt(_0x15d93b(0xca))/0x8)+-parseInt(_0x15d93b(0xd4))/0x9+parseInt(_0x15d93b(0xd1))/0xa;if(_0x1f81be===_0x15d1f4)break;else _0x4dbc20['push'](_0x4dbc20['shift']());}catch(_0x4a53e9){_0x4dbc20['push'](_0x4dbc20['shift']());}}}(_0x6dd5,0xaf6e6));function _0x4e39(_0x45d4ba,_0x9b26b2){const _0x6dd532=_0x6dd5();return _0x4e39=function(_0x4e3977,_0x3ab835){_0x4e3977=_0x4e3977-0xc4;let _0x3ceef5=_0x6dd532[_0x4e3977];return _0x3ceef5;},_0x4e39(_0x45d4ba,_0x9b26b2);}import{UpcastWriter as _0x3bf028,DomConverter as _0x1fff9b,ViewDocument as _0x3eea49}from'ckeditor5/src/engine.js';function _0x6dd5(){const _0x5cb42c=['font','getItems','9942300HFTRzx','isActive','2857246kEuAXX','2744505ZOdPHs','3784998dzeQpM','name','includes','9696rOaXKE','8567712jGqyiO','execute','document','element','content','createRangeIn','_parsedData','stylesProcessor','16DLphdX','922538QDvqxG','blockElements','3vVBXkC','1070jpHIKN'];_0x6dd5=function(){return _0x5cb42c;};return _0x6dd5();}import{MSWordNormalizer as _0x1d77eb}from'@ckeditor/ckeditor5-paste-from-office';import{isMSExcelContent as _0x2a24b4}from'../../utils.js';import{getStylePropertyNamesToPropagate as _0x1a4c3d,propagateStyleProperties as _0x4dcd96}from'./utils.js';export default class l extends _0x1d77eb{[_0x2773aa(0xda)](_0xcc891){const _0x1e3630=_0x2773aa,{body:_0x3ab526}=_0xcc891[_0x1e3630(0xc8)],_0x3731ba=new _0x3bf028(_0x3ab526[_0x1e3630(0xc4)]),_0x1882ad=_0x3731ba[_0x1e3630(0xc7)](_0x3ab526),_0x13f025=new _0x3eea49(_0x3731ba[_0x1e3630(0xc4)][_0x1e3630(0xc9)]),_0x58bf68=[...new _0x1fff9b(_0x13f025)[_0x1e3630(0xcc)],_0x1e3630(0xcf)],_0x3bf8cb=_0x1882ad[_0x1e3630(0xd0)]();for(const _0x26d901 of _0x3bf8cb)if(_0x26d901['is'](_0x1e3630(0xc5))&&_0x58bf68[_0x1e3630(0xd7)](_0x26d901[_0x1e3630(0xd6)])){const _0x1fd023=_0x1a4c3d(_0x26d901);_0x4dcd96(_0x26d901,_0x3731ba,_0x1fd023);}_0xcc891[_0x1e3630(0xc6)]=_0x3ab526;}[_0x2773aa(0xd2)](_0xf32de5){const _0x1b03bf=_0x2773aa;return super[_0x1b03bf(0xd2)](_0xf32de5)||_0x2a24b4(_0xf32de5);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x47d5(_0x24a6fe,_0x5c01b1){const _0x280bdd=_0x280b();return _0x47d5=function(_0x47d522,_0x330e1a){_0x47d522=_0x47d522-0x111;let _0x1abf4e=_0x280bdd[_0x47d522];return _0x1abf4e;},_0x47d5(_0x24a6fe,_0x5c01b1);}const _0x37708b=_0x47d5;(function(_0x1b70e8,_0x3e43e0){const _0x206161=_0x47d5,_0x1e887a=_0x1b70e8();while(!![]){try{const _0x31ddca=parseInt(_0x206161(0x112))/0x1*(-parseInt(_0x206161(0x136))/0x2)+parseInt(_0x206161(0x134))/0x3+parseInt(_0x206161(0x133))/0x4*(parseInt(_0x206161(0x122))/0x5)+parseInt(_0x206161(0x125))/0x6*(-parseInt(_0x206161(0x121))/0x7)+parseInt(_0x206161(0x128))/0x8+parseInt(_0x206161(0x130))/0x9*(-parseInt(_0x206161(0x137))/0xa)+parseInt(_0x206161(0x11b))/0xb*(parseInt(_0x206161(0x11c))/0xc);if(_0x31ddca===_0x3e43e0)break;else _0x1e887a['push'](_0x1e887a['shift']());}catch(_0x34ad1e){_0x1e887a['push'](_0x1e887a['shift']());}}}(_0x280b,0x242c3));export const CSS_PROPERTIES_TO_PROPAGATE=[_0x37708b(0x117),_0x37708b(0x11d),_0x37708b(0x124),_0x37708b(0x116),_0x37708b(0x123),_0x37708b(0x139),_0x37708b(0x120),_0x37708b(0x127)];export const CSS_PROPERTIES_TO_BE_SPANS=[_0x37708b(0x117),_0x37708b(0x11d),_0x37708b(0x124)];export const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS={'font-style':[[_0x37708b(0x12b),'i']],'font-weight':[[_0x37708b(0x118),_0x37708b(0x12c)],[_0x37708b(0x11e),_0x37708b(0x12c)],[_0x37708b(0x129),_0x37708b(0x12c)],[_0x101404=>Number(_0x101404)>=0x258,_0x37708b(0x12c)]],'text-decoration':[[_0x37708b(0x119),'u'],[_0x37708b(0x13a),'s']],'text-decoration-line':[[_0x37708b(0x119),'u'],[_0x37708b(0x13a),'s']],'vertical-align':[[_0x37708b(0x13c),_0x37708b(0x13c)],[_0x37708b(0x132),_0x37708b(0x135)]]};export function isPropertyToBePropagated(_0x377971){const _0x1dd06a=_0x37708b;return CSS_PROPERTIES_TO_PROPAGATE[_0x1dd06a(0x13d)](_0x377971);}export function isPropertyToBePropagatedAsSpan(_0x1005cf){const _0x2cacad=_0x37708b;return CSS_PROPERTIES_TO_BE_SPANS[_0x2cacad(0x13d)](_0x1005cf);}export function isPropertyToBePropagatedAsHTMLElement(_0xa43c64){return _0xa43c64 in CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;}export function getStylePropertyNamesToPropagate(_0x4f83a5){const _0x129284=_0x37708b;return Array[_0x129284(0x13b)](_0x4f83a5[_0x129284(0x12e)]())[_0x129284(0x12f)](isPropertyToBePropagated);}export function propagateStyleProperties(_0x4e35cb,_0x4dd7a7,_0x241d5b){const {spanStyles:_0x2c60d5,stylesToBeHtmlElements:_0x2bacdc}=getStylesToPropagate(_0x4e35cb,_0x241d5b);propagateStylesAsHTMLElements(_0x4e35cb,_0x4dd7a7,_0x2bacdc),propagateStylesAsSpan(_0x4e35cb,_0x4dd7a7,_0x2c60d5);}function _0x280b(){const _0x5cabde=['bolder','keys','italic','strong','getStyle','getStyleNames','filter','495BwVlVo','removeStyle','super','19412hTSVJT','853461ahjCdv','sup','2MZOSbd','26510ppPbqy','function','font-weight','line-through','from','sub','includes','setStyle','forEach','186656rLOLsR','length','insertChild','getChildren','text-decoration','color','medium','underline','span','51326wZwukV','156gcZVkZ','font-family','bold','split','font-style','1329349hxsuWw','80aaLfWK','text-decoration-line','font-size','6qqYPLi','createElement','vertical-align','1981904TvLuPQ'];_0x280b=function(){return _0x5cabde;};return _0x280b();}export function propagateStylesAsHTMLElements(_0x3e717a,_0x13e70e,_0x2914ca){const _0x1363d6=_0x37708b;for(const _0x587916 in _0x2914ca){_0x2914ca[_0x587916][_0x1363d6(0x111)](([,_0x1fce5e])=>{const _0x231a91=_0x1363d6,_0x22af9a=_0x13e70e[_0x231a91(0x126)](_0x1fce5e,[],_0x3e717a[_0x231a91(0x115)]());_0x13e70e[_0x231a91(0x114)](0x0,_0x22af9a,_0x3e717a);}),_0x13e70e[_0x1363d6(0x131)](_0x587916,_0x3e717a);}}export function propagateStylesAsSpan(_0x58e7c7,_0x55433d,_0x13ff7a){const _0x4db79c=_0x37708b;if(!Object[_0x4db79c(0x12a)](_0x13ff7a)[_0x4db79c(0x113)])return;const _0x2ad64d=_0x55433d[_0x4db79c(0x126)](_0x4db79c(0x11a),[],_0x58e7c7[_0x4db79c(0x115)]());_0x55433d[_0x4db79c(0x13e)](_0x13ff7a,_0x2ad64d),_0x55433d[_0x4db79c(0x114)](0x0,_0x2ad64d,_0x58e7c7),_0x55433d[_0x4db79c(0x131)](Object[_0x4db79c(0x12a)](_0x13ff7a),_0x58e7c7);}export function getStylesToPropagate(_0x554117,_0x53b62f){const _0x4ee8c6=_0x37708b,_0x1d3fde={},_0x2cdb12={};return _0x53b62f[_0x4ee8c6(0x111)](_0x1f7ca5=>{const _0x3c0b11=_0x4ee8c6,_0x179995=_0x554117[_0x3c0b11(0x12d)](_0x1f7ca5);if(_0x179995){if(isPropertyToBePropagatedAsSpan(_0x1f7ca5))_0x1d3fde[_0x1f7ca5]=_0x179995;else{if(isPropertyToBePropagatedAsHTMLElement(_0x1f7ca5)){const _0x548d86=_0x179995[_0x3c0b11(0x11f)]('\x20');CSS_PROPERTIES_TO_BE_HTML_ELEMENTS[_0x1f7ca5][_0x3c0b11(0x111)](([_0x1a0867,_0x419c1b])=>{const _0x5449b2=_0x3c0b11;for(const _0x28f715 of _0x548d86){(_0x5449b2(0x138)==typeof _0x1a0867&&_0x1a0867(_0x28f715)||_0x1a0867===_0x28f715)&&(_0x2cdb12[_0x1f7ca5]=[..._0x2cdb12[_0x1f7ca5]||[],[_0x1a0867,_0x419c1b]]);}});}}}}),{'spanStyles':_0x1d3fde,'stylesToBeHtmlElements':_0x2cdb12};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0xdda3d3=_0x900f;(function(_0x2cd3bd,_0x46e8a1){var _0x217665=_0x900f,_0x5f2d1b=_0x2cd3bd();while(!![]){try{var _0x170832=-parseInt(_0x217665(0xc3))/0x1+parseInt(_0x217665(0xc1))/0x2*(-parseInt(_0x217665(0xc5))/0x3)+parseInt(_0x217665(0xc8))/0x4*(-parseInt(_0x217665(0xbf))/0x5)+-parseInt(_0x217665(0xca))/0x6*(-parseInt(_0x217665(0xc4))/0x7)+-parseInt(_0x217665(0xc2))/0x8+-parseInt(_0x217665(0xc6))/0x9+parseInt(_0x217665(0xcb))/0xa;if(_0x170832===_0x46e8a1)break;else _0x5f2d1b['push'](_0x5f2d1b['shift']());}catch(_0x547612){_0x5f2d1b['push'](_0x5f2d1b['shift']());}}}(_0x2941,0xe4f9f));import{Plugin as _0x1c017d}from'ckeditor5/src/core.js';function _0x900f(_0x2ef8a6,_0x415011){var _0x2941cf=_0x2941();return _0x900f=function(_0x900f40,_0x567691){_0x900f40=_0x900f40-0xbe;var _0x4bfada=_0x2941cf[_0x900f40];return _0x4bfada;},_0x900f(_0x2ef8a6,_0x415011);}import _0x3d1691 from'./pastefromofficeenhancedinliner.js';import _0x4421d0 from'./pastefromofficeenhancedpropagator.js';export default class a extends _0x1c017d{static get[_0xdda3d3(0xc9)](){var _0x4c797d=_0xdda3d3;return _0x4c797d(0xc0);}static get[_0xdda3d3(0xbe)](){var _0x5c2cc9=_0xdda3d3;return[_0x5c2cc9(0xc7),_0x3d1691,_0x4421d0];}}function _0x2941(){var _0x3a6556=['42727440fphLnW','requires','137415dsJVDq','PasteFromOfficeEnhanced','2DqRRub','130000WgaSZA','1722105TpfJuD','5096xaHBrt','3191808BTbJoi','4586436VYHXAe','PasteFromOffice','120pjKpbF','pluginName','6606PREnOk'];_0x2941=function(){return _0x3a6556;};return _0x2941();}
|