@ckeditor/ckeditor5-paste-from-office-enhanced 48.2.0-alpha.7 → 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.
- package/dist/augmentation.d.ts +8 -8
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/normalizers/inliner/msofficestylesinliner.d.ts +39 -39
- package/dist/normalizers/inliner/utils.d.ts +125 -125
- package/dist/normalizers/propagator/msofficeinlinestylepropagator.d.ts +42 -42
- package/dist/normalizers/propagator/utils.d.ts +87 -89
- package/dist/pastefromofficeenhanced.d.ts +33 -33
- package/dist/pastefromofficeenhancedinliner.d.ts +33 -33
- package/dist/pastefromofficeenhancedpropagator.d.ts +35 -35
- package/dist/utils.d.ts +8 -8
- package/package.json +6 -6
package/dist/augmentation.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { PasteFromOfficeEnhanced } from
|
|
6
|
-
declare module
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 { PasteFromOfficeEnhanced } from "./index.js";
|
|
6
|
+
declare module "@ckeditor/ckeditor5-core" {
|
|
7
|
+
interface PluginsMap {
|
|
8
|
+
[PasteFromOfficeEnhanced.pluginName]: PasteFromOfficeEnhanced;
|
|
9
|
+
}
|
|
10
10
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
export { PasteFromOfficeEnhanced } from
|
|
9
|
-
import
|
|
6
|
+
* @module paste-from-office-enhanced
|
|
7
|
+
*/
|
|
8
|
+
export { PasteFromOfficeEnhanced } from "./pastefromofficeenhanced.js";
|
|
9
|
+
import "./augmentation.js";
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x367eaf}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x27e5f1,PasteFromOffice as _0x33780c}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x584e44,uid as _0x489d7b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x1692fb,ViewDocument as _0x5d10cf,ViewDomConverter as _0x4fada7}from'@ckeditor/ckeditor5-engine/dist/index.js';const a=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0xe03171){return a['test'](_0xe03171);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x18869b,_0x4390ec){const _0x48726d=new Map();for(const [_0x1d4505,_0x49bded]of _0x4390ec){if(!_0x1d4505['tagName']&&!_0x1d4505['className'])continue;const _0x68c083=!_0x1d4505['tagName']||_0x18869b['name']===_0x1d4505['tagName'],_0x3599ef=!_0x1d4505['className']||_0x18869b['hasClass'](_0x1d4505['className']);_0x68c083&&_0x3599ef&&_0x48726d['set'](_0x1d4505,_0x49bded);}return _0x48726d;}function w(_0x1cce1c){const _0x3f0b49={};for(let _0x4623ea=0x0;_0x4623ea<_0x1cce1c['length'];_0x4623ea++){const _0x2d797f=_0x1cce1c[_0x4623ea],_0x5b53f5=_0x1cce1c['getPropertyValue'](_0x2d797f);'initial'!==_0x5b53f5&&(_0x3f0b49[_0x2d797f]=_0x5b53f5);}return _0x3f0b49;}function m(_0x1160bd){const _0x3deac5=_0x1160bd['split'](',')['map'](_0x5cd340=>_0x5cd340['trim']()),_0x4af679=[];for(const _0x167f37 of _0x3deac5){const _0x5b675b=l['exec'](_0x167f37);_0x5b675b&&_0x4af679['push'](_0x5b675b['groups']);}return _0x4af679;}function p(_0x3f397f){const _0x13c847={};for(const _0x500a1d of _0x3f397f)Object['assign'](_0x13c847,_0x500a1d);return _0x13c847;}class MSOfficeStylesInliner extends _0x27e5f1{['execute'](_0x1bca28){const {styles:_0x50cf52,stylesString:_0x3ddea6}=_0x1bca28['extraContent'],_0x31c652=new _0x1692fb(_0x1bca28['content']['document']),_0x39884c=_0x31c652['createRangeIn'](_0x1bca28['content']),_0x5d25a9=function(_0x4f6d32){const _0x5b3e50={};for(const _0x41a67d of _0x4f6d32)for(const _0x4a411c of _0x41a67d['cssRules'])if(_0x4a411c instanceof CSSStyleRule){const _0x3025df=w(_0x4a411c['style']);_0x5b3e50[_0x4a411c['selectorText']]=Object['assign']({},_0x5b3e50[_0x4a411c['selectorText']]||{},_0x3025df);}return _0x5b3e50;}(_0x50cf52),_0x32f56c=function(_0x3a03e7){const _0x22daf6=new Map();for(const _0x2c5538 in _0x3a03e7){const _0x17b7d1=m(_0x2c5538),_0x257365=_0x3a03e7[_0x2c5538];for(const _0x51257b of _0x17b7d1)_0x22daf6['set'](_0x51257b,_0x257365);}return _0x22daf6;}(_0x5d25a9),_0x12d507=function(_0x915a08){const _0x5b449e={},_0x3976df=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x1cf843=/\.(?<className>[\w-]+)/g;let _0x24c9e3;for(;null!==(_0x24c9e3=_0x3976df['exec'](_0x915a08));){const {selector:_0x4b6162,color:_0x52ce2b,patternType:_0x2acbcd}=_0x24c9e3['groups'];if('auto'!==_0x52ce2b['toLowerCase']()&&'none'!==_0x2acbcd['toLowerCase']()&&'auto'!==_0x2acbcd['toLowerCase']()){for(const _0x1d3b4f of _0x4b6162['matchAll'](_0x1cf843))_0x5b449e[_0x1d3b4f['groups']['className']]=_0x52ce2b;}}return _0x5b449e;}(_0x3ddea6);for(const _0x269bf5 of _0x39884c){if('elementStart'!==_0x269bf5['type'])continue;const _0x1a4233=_0x269bf5['item'],_0x51f9ef=d(_0x1a4233,_0x32f56c),_0xb19c4=_0x51f9ef['size']?p(Array['from'](_0x51f9ef['values']())):{};if(!('background-color'in _0xb19c4)&&!('background'in _0xb19c4)){for(const [_0x4becf8,_0x30899a]of Object['entries'](_0x12d507))if(_0x1a4233['hasClass'](_0x4becf8)){_0xb19c4['background-color']=_0x30899a;break;}}for(const _0x234457 in _0xb19c4)_0x1a4233['hasStyle'](_0x234457)||_0x31c652['setStyle'](_0x234457,_0xb19c4[_0x234457],_0x1a4233);}}['isActive'](_0x2df373){return super['isActive'](_0x2df373)||u(_0x2df373);}}class PasteFromOfficeEnhancedInliner extends _0x367eaf{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x33780c];}['init'](){const _0xede1a1=this['editor'],_0x443ee5=_0xede1a1['plugins']['get']('PasteFromOffice'),_0x3a456b=_0xede1a1['editing']['view']['document'],_0x594e65=new MSOfficeStylesInliner(_0x3a456b);_0x443ee5['registerNormalizer'](_0x594e65,_0x584e44['high']+0xb);}['afterInit'](){!async function(_0x231f1c){const _0x4c48c9=_0x42d82c([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0xc90a07=0x7374585f,_0x488f6c=0x7373d38f^_0xc90a07,_0x1fd52f=window[_0x42d82c([0x44,0x61,0x74,0x65])][_0x42d82c([0x6e,0x6f,0x77])](),_0xb52aeb=_0x231f1c[_0x42d82c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e6516=new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6d2faa=>{_0xb52aeb[_0x42d82c([0x6f,0x6e,0x63,0x65])](_0x42d82c([0x72,0x65,0x61,0x64,0x79]),_0x6d2faa);}),_0x59db5c={[_0x42d82c([0x6b,0x74,0x79])]:_0x42d82c([0x45,0x43]),[_0x42d82c([0x75,0x73,0x65])]:_0x42d82c([0x73,0x69,0x67]),[_0x42d82c([0x63,0x72,0x76])]:_0x42d82c([0x50,0x2d,0x32,0x35,0x36]),[_0x42d82c([0x78])]:_0x42d82c([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x42d82c([0x79])]:_0x42d82c([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x42d82c([0x61,0x6c,0x67])]:_0x42d82c([0x45,0x53,0x32,0x35,0x36])},_0x3bbf3b=_0xb52aeb[_0x42d82c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x42d82c([0x67,0x65,0x74])](_0x42d82c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x196882(){let _0x1e0f0e,_0x53fad6=null,_0x1ee02c=null;try{if(_0x3bbf3b==_0x42d82c([0x47,0x50,0x4c]))return _0x42d82c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1e0f0e=_0x538be3(),!_0x1e0f0e)return _0x42d82c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1e0f0e[_0x42d82c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1ee02c=_0x595668(_0x1e0f0e[_0x42d82c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1e0f0e[_0x42d82c([0x6a,0x74,0x69])])),await _0x46b80c()?_0x7efc3e()?_0x1ff78f()?_0x42d82c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x141ddb()?(_0x1e0f0e[_0x42d82c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42d82c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53fad6=_0x38c6fc(_0x42d82c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5779c3()):_0x42d82c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x42d82c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x42d82c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x42d82c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1ff78f(){const _0x282186=[_0x42d82c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x42d82c([0x74,0x72,0x69,0x61,0x6c])][_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e0f0e[_0x42d82c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1fd52f/0x3e8:0xe10*_0x488f6c;return _0x1e0f0e[_0x42d82c([0x65,0x78,0x70])]<_0x282186;}function _0x7efc3e(){const _0x5b9c2b=_0x1e0f0e[_0x42d82c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5b9c2b&&(!!_0x5b9c2b[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d82c([0x2a]))||(!!_0x5b9c2b[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d82c([0x50,0x4f,0x45]))||(!!_0x5b9c2b[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d82c([0x50,0x50]))||!(!_0x5b9c2b[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d82c([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0x4a22c2()))));}function _0x141ddb(){const _0x7a20cd=_0x1e0f0e[_0x42d82c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7a20cd||0x0==_0x7a20cd[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b727d}=new URL(window[_0x42d82c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x7a20cd[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b727d))return!0x0;const _0x3b8da5=_0x2b727d[_0x42d82c([0x73,0x70,0x6c,0x69,0x74])](_0x42d82c([0x2e]));return _0x7a20cd[_0x42d82c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21c7df=>_0x21c7df[_0x42d82c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d82c([0x2a])))[_0x42d82c([0x6d,0x61,0x70])](_0x5e81cf=>_0x5e81cf[_0x42d82c([0x73,0x70,0x6c,0x69,0x74])](_0x42d82c([0x2e])))[_0x42d82c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d8e57=>_0x3d8e57[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3b8da5[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d82c([0x6d,0x61,0x70])](_0x1b67bc=>Array(_0x3b8da5[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1b67bc[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d82c([0x66,0x69,0x6c,0x6c])](_0x1b67bc[0x0]===_0x42d82c([0x2a])?_0x42d82c([0x2a]):'')[_0x42d82c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1b67bc))[_0x42d82c([0x73,0x6f,0x6d,0x65])](_0x2cc399=>_0x3b8da5[_0x42d82c([0x65,0x76,0x65,0x72,0x79])]((_0x409a19,_0x239137)=>_0x2cc399[_0x239137]===_0x409a19||_0x2cc399[_0x239137]===_0x42d82c([0x2a])));}function _0x5779c3(){return _0x53fad6&&_0x1ee02c?new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3bfc34,_0x41288c)=>{_0x53fad6[_0x42d82c([0x74,0x68,0x65,0x6e])](_0x3bfc34,_0x41288c),_0x1ee02c[_0x42d82c([0x74,0x68,0x65,0x6e])](_0xd81b7d=>{_0xd81b7d!=_0x42d82c([0x56,0x61,0x6c,0x69,0x64])&&_0x3bfc34(_0xd81b7d);},_0x41288c);}):_0x53fad6||_0x1ee02c||_0x42d82c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x595668(_0x1bd672,_0xad3f24){return new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x456c03=>{if(_0x35b974())return _0x456c03(_0x42d82c([0x56,0x61,0x6c,0x69,0x64]));_0x307888(),_0xb52aeb[_0x42d82c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x42d82c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x575c29=!0x1;const _0x4cd761=_0x489d7b();function _0x388978(_0x1ad6c7){return!!_0x1ad6c7&&(typeof _0x1ad6c7===_0x42d82c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ad6c7===_0x42d82c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ad6c7[_0x42d82c([0x74,0x68,0x65,0x6e])]===_0x42d82c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ad6c7[_0x42d82c([0x63,0x61,0x74,0x63,0x68])]===_0x42d82c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x420664(_0x1a05a9){_0x19db36(_0x1a05a9)[_0x42d82c([0x74,0x68,0x65,0x6e])](_0x43c603=>{if(!_0x43c603||_0x43c603[_0x42d82c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x42d82c([0x6f,0x6b]))return _0x42d82c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x26039a(_0x298d00(_0x4cd761+_0xad3f24))!=_0x43c603[_0x42d82c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x42d82c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x42d82c([0x56,0x61,0x6c,0x69,0x64]);})[_0x42d82c([0x74,0x68,0x65,0x6e])](_0x503ff0=>(_0x16e83a(),_0x503ff0),()=>{const _0x406cba=_0x4dbb65();return null==_0x406cba?(_0x16e83a(),_0x42d82c([0x56,0x61,0x6c,0x69,0x64])):_0x42d82c(_0x1fd52f-_0x406cba>(0x5778dc5f^_0xc90a07)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x42d82c([0x74,0x68,0x65,0x6e])](_0x456c03)[_0x42d82c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x456c03(_0x42d82c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x475a22=0x7342b6df^_0xc90a07;function _0x16e83a(){const _0x50c678=_0x42d82c([0x6c,0x6c,0x63,0x74,0x2d])+_0x26039a(_0x298d00(_0x1bd672)),_0x444f1e=_0x30ec34(_0x26039a(window[_0x42d82c([0x4d,0x61,0x74,0x68])][_0x42d82c([0x63,0x65,0x69,0x6c])](_0x1fd52f/_0x475a22)));window[_0x42d82c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d82c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x50c678,_0x444f1e);}function _0x4dbb65(){const _0x3f333d=_0x42d82c([0x6c,0x6c,0x63,0x74,0x2d])+_0x26039a(_0x298d00(_0x1bd672)),_0xabcda4=window[_0x42d82c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d82c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f333d);return _0xabcda4?window[_0x42d82c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x30ec34(_0xabcda4),0x10)*_0x475a22:null;}function _0x19db36(_0x162372){return new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23ef35,_0xe46cb9)=>{_0x162372[_0x42d82c([0x74,0x68,0x65,0x6e])](_0x23ef35,_0xe46cb9),window[_0x42d82c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xe46cb9,0x73758c9f^_0xc90a07);});}}_0xb52aeb[_0x42d82c([0x6f,0x6e])](_0x42d82c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2889b3,_0x5abfc0)=>{if(_0x5abfc0[0x0]!=_0x1bd672)return _0x456c03(_0x42d82c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5abfc0[0x1]={..._0x5abfc0[0x1],[_0x42d82c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4cd761};},{[_0x42d82c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d82c([0x68,0x69,0x67,0x68])}),_0xb52aeb[_0x42d82c([0x6f,0x6e])](_0x42d82c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2050a3=>{_0x388978(_0x2050a3[_0x42d82c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x575c29=!0x0,_0x420664(_0x2050a3[_0x42d82c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x42d82c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d82c([0x6c,0x6f,0x77])}),_0x2e6516[_0x42d82c([0x74,0x68,0x65,0x6e])](()=>{_0x575c29||_0x456c03(_0x42d82c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x35b974(){return _0xb52aeb[_0x42d82c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d82c([0x76,0x69,0x65,0x77])][_0x42d82c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x42d82c([0x61,0x75,0x74,0x6f]);}function _0x307888(){_0xb52aeb[_0x42d82c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d82c([0x76,0x69,0x65,0x77])][_0x42d82c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x42d82c([0x61,0x75,0x74,0x6f]);}}function _0x38c6fc(_0x123dc4){const _0xaf36e3=[new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2084ed=>setTimeout(_0x2084ed,0x737d6693^_0xc90a07)),_0x2e6516[_0x42d82c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcda7f9=>{let _0x290136=0x0;_0xb52aeb[_0x42d82c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d82c([0x6f,0x6e])](_0x42d82c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x129981,_0x511fd7)=>{_0x511fd7[0x0][_0x42d82c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x290136++,_0x290136==(0x73745db7^_0xc90a07)&&(_0xcda7f9(),_0x129981[_0x42d82c([0x6f,0x66,0x66])]());});}))];return window[_0x42d82c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x42d82c([0x72,0x61,0x63,0x65])](_0xaf36e3)[_0x42d82c([0x74,0x68,0x65,0x6e])](()=>_0x123dc4);}async function _0x46153c(){await _0x2e6516,_0xb52aeb[_0x42d82c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d82c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d1a41,_0xb52aeb[_0x42d82c([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d82c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d1a41,_0xb52aeb[_0x42d82c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x42d82c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4a22c2(){return window[_0x42d82c([0x67,0x6c,0x6f,0x62])]&&window[_0x42d82c([0x67,0x6c,0x6f,0x62])][_0x42d82c([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x12cae3(_0x15a1d6){const _0x3ebfda=_0x41b2a3();_0xb52aeb[_0x3ebfda]=_0x42d82c([0x70,0x61,0x73,0x74,0x65,0x46,0x72,0x6f,0x6d,0x4f,0x66,0x66,0x69,0x63,0x65,0x45,0x6e,0x68,0x61,0x6e,0x63,0x65,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x15a1d6,_0x15a1d6!=_0x42d82c([0x56,0x61,0x6c,0x69,0x64])&&_0x46153c();}function _0x41b2a3(){const _0x5b6824=window[_0x42d82c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x42d82c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x42d82c([0x6e,0x6f,0x77])]())[_0x42d82c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x42d82c([0x2e]),'');let _0x4126ec=_0x42d82c([0x73]);for(let _0x392a50=0x0;_0x392a50<_0x5b6824[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x392a50+=0x2){let _0x11e57e=window[_0x42d82c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b6824[_0x42d82c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x392a50,_0x392a50+0x2));_0x11e57e>=_0x4c48c9[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x11e57e-=_0x4c48c9[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4126ec+=_0x4c48c9[_0x11e57e];}return _0x4126ec;}function _0x538be3(){const _0x1ae38c=_0x3bbf3b[_0x42d82c([0x73,0x70,0x6c,0x69,0x74])](_0x42d82c([0x2e]));if(0x3!=_0x1ae38c[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x161891(_0x1ae38c[0x1]);function _0x161891(_0x481c35){const _0x24048a=_0x371829(_0x481c35);return _0x24048a&&_0x429af4()?_0x24048a:null;function _0x429af4(){const _0x3ae926=_0x24048a[_0x42d82c([0x6a,0x74,0x69])],_0x4a5d4c=window[_0x42d82c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ae926[_0x42d82c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ae926[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9bb2e4={..._0x24048a,[_0x42d82c([0x6a,0x74,0x69])]:_0x3ae926[_0x42d82c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3ae926[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9bb2e4[_0x42d82c([0x76,0x63])],_0x298d00(_0x9bb2e4)==_0x4a5d4c;}}}async function _0x46b80c(){let _0x31c09e=!0x0;try{const _0x164ddc=_0x3bbf3b[_0x42d82c([0x73,0x70,0x6c,0x69,0x74])](_0x42d82c([0x2e])),[_0x2f1f2a,_0x285605,_0x18874e]=_0x164ddc;return _0x1c2ad7(_0x2f1f2a),await _0x21566d(_0x2f1f2a,_0x285605,_0x18874e),_0x31c09e;}catch{return!0x1;}function _0x1c2ad7(_0x1b5fc4){const _0x5ee420=_0x371829(_0x1b5fc4);_0x5ee420&&_0x5ee420[_0x42d82c([0x61,0x6c,0x67])]==_0x42d82c([0x45,0x53,0x32,0x35,0x36])||(_0x31c09e=!0x1);}async function _0x21566d(_0x403b3d,_0x526e27,_0x19ffa3){const _0x34638e=window[_0x42d82c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x42d82c([0x66,0x72,0x6f,0x6d])](_0xec2b28(_0x19ffa3),_0x55dce7=>_0x55dce7[_0x42d82c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x154205=new window[(_0x42d82c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x42d82c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x403b3d+_0x42d82c([0x2e])+_0x526e27),_0x4df5a7=window[_0x42d82c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x42d82c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4df5a7)return;const _0x222816=await _0x4df5a7[_0x42d82c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x42d82c([0x6a,0x77,0x6b]),_0x59db5c,{[_0x42d82c([0x6e,0x61,0x6d,0x65])]:_0x42d82c([0x45,0x43,0x44,0x53,0x41]),[_0x42d82c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x42d82c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x42d82c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4df5a7[_0x42d82c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x42d82c([0x6e,0x61,0x6d,0x65])]:_0x42d82c([0x45,0x43,0x44,0x53,0x41]),[_0x42d82c([0x68,0x61,0x73,0x68])]:{[_0x42d82c([0x6e,0x61,0x6d,0x65])]:_0x42d82c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x222816,_0x34638e,_0x154205)||(_0x31c09e=!0x1);}}function _0x371829(_0x523b1d){return _0x523b1d[_0x42d82c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x42d82c([0x65,0x79]))?JSON[_0x42d82c([0x70,0x61,0x72,0x73,0x65])](_0xec2b28(_0x523b1d)):null;}function _0xec2b28(_0x6ea821){return window[_0x42d82c([0x61,0x74,0x6f,0x62])](_0x6ea821[_0x42d82c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x42d82c([0x2b]))[_0x42d82c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x42d82c([0x2f])));}function _0x298d00(_0x71f8cd){let _0x33706c=0x1505;function _0x245788(_0x9aba3d){for(let _0xa666ac=0x0;_0xa666ac<_0x9aba3d[_0x42d82c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xa666ac++){const _0x377fe0=_0x9aba3d[_0x42d82c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xa666ac);_0x33706c=(_0x33706c<<0x5)+_0x33706c+_0x377fe0,_0x33706c&=_0x33706c;}}function _0x30e948(_0x3379fe){Array[_0x42d82c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3379fe)?_0x3379fe[_0x42d82c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x30e948):_0x3379fe&&typeof _0x3379fe==_0x42d82c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x42d82c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3379fe)[_0x42d82c([0x73,0x6f,0x72,0x74])]()[_0x42d82c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5aff13,_0x5b4369])=>{_0x245788(_0x5aff13),_0x30e948(_0x5b4369);}):_0x245788(window[_0x42d82c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3379fe));}return _0x30e948(_0x71f8cd),_0x33706c>>>0x0;}function _0x26039a(_0x95e380){return _0x95e380[_0x42d82c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x42d82c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x42d82c([0x30]));}function _0x30ec34(_0x1b3ef9){return _0x1b3ef9[_0x42d82c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x42d82c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x42d82c([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d1a41(){}function _0x42d82c(_0x4201c2){return _0x4201c2['map'](_0x34867f=>String['fromCharCode'](_0x34867f))['join']('');}_0x12cae3(await _0x196882());}(this);}}const y=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],g=['color','font-family','font-size'],h={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x636957=>Number(_0x636957)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function O(_0x465e3d){return y['includes'](_0x465e3d);}function E(_0x5333fd){return Array['from'](_0x5333fd['getStyleNames']())['filter'](O);}function F(_0x27c703,_0xdf712e,_0x384fb2){const {spanStyles:_0x2d28a6,stylesToBeHtmlElements:_0xdae88c}=L(_0x27c703,_0x384fb2);!function(_0x30031e,_0x566954,_0x5b3122){for(const _0x9396c0 in _0x5b3122){_0x5b3122[_0x9396c0]['forEach'](([,_0x31cf2c])=>{const _0x46815a=_0x566954['createElement'](_0x31cf2c,[],_0x30031e['getChildren']());_0x566954['insertChild'](0x0,_0x46815a,_0x30031e);}),_0x566954['removeStyle'](_0x9396c0,_0x30031e);}}(_0x27c703,_0xdf712e,_0xdae88c),function(_0x5c0ba1,_0x12005d,_0x269f29){if(!Object['keys'](_0x269f29)['length'])return;const _0x317436=_0x12005d['createElement']('span',[],_0x5c0ba1['getChildren']());_0x12005d['setStyle'](_0x269f29,_0x317436),_0x12005d['insertChild'](0x0,_0x317436,_0x5c0ba1),_0x12005d['removeStyle'](Object['keys'](_0x269f29),_0x5c0ba1);}(_0x27c703,_0xdf712e,_0x2d28a6);}function P(_0x262c5e,_0x44c9ae,_0x36a481){const {spanStyles:_0x3bf8f8}=L(_0x262c5e,_0x36a481),_0x466c93=Object['keys'](_0x3bf8f8);if(!_0x466c93['length'])return;let _0x42b315=!0x1;for(const _0x494bff of _0x262c5e['getChildren']())if(_0x494bff['is']('element','span')){_0x42b315=!0x0;for(const [_0x48dfb8,_0x8aafbe]of Object['entries'](_0x3bf8f8))_0x494bff['hasStyle'](_0x48dfb8)||_0x44c9ae['setStyle']({[_0x48dfb8]:_0x8aafbe},_0x494bff);}_0x42b315&&_0x44c9ae['removeStyle'](_0x466c93,_0x262c5e);}function L(_0x2d92cf,_0x44eb50){const _0x59c3ba={},_0x417024={};return _0x44eb50['forEach'](_0x947d23=>{const _0x335913=_0x2d92cf['getStyle'](_0x947d23);if(_0x335913){if(function(_0xbb65f1){return g['includes'](_0xbb65f1);}(_0x947d23))_0x59c3ba[_0x947d23]=_0x335913;else{if(function(_0x3b4af1){return _0x3b4af1 in h;}(_0x947d23)){const _0x1b4911=_0x335913['split']('\x20');h[_0x947d23]['forEach'](([_0x2de176,_0x5a0126])=>{for(const _0x46c93f of _0x1b4911){('function'==typeof _0x2de176&&_0x2de176(_0x46c93f)||_0x2de176===_0x46c93f)&&(_0x417024[_0x947d23]=[..._0x417024[_0x947d23]||[],[_0x2de176,_0x5a0126]]);}});}}}}),{'spanStyles':_0x59c3ba,'stylesToBeHtmlElements':_0x417024};}class MSOfficeInlineStylePropagator extends _0x27e5f1{['execute'](_0x4bea01){const _0x39e939=new _0x1692fb(_0x4bea01['content']['document']),_0x3d783b=_0x39e939['createRangeIn'](_0x4bea01['content']),_0x2f488d=new _0x5d10cf(_0x39e939['document']['stylesProcessor']),_0x557b63=[...new _0x4fada7(_0x2f488d)['blockElements'],'font'],_0x10a16e=_0x3d783b['getItems']();for(const _0x2d5418 of _0x10a16e)if(_0x2d5418['is']('element')&&_0x557b63['includes'](_0x2d5418['name'])){if(_0x2d5418['hasStyle']('mso-list')&&'none'!==_0x2d5418['getStyle']('mso-list')){P(_0x2d5418,_0x39e939,E(_0x2d5418));continue;}F(_0x2d5418,_0x39e939,E(_0x2d5418));}}['isActive'](_0x9320c3){return super['isActive'](_0x9320c3)||u(_0x9320c3);}}class PasteFromOfficeEnhancedPropagator extends _0x367eaf{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x33780c];}['init'](){const _0x1c00aa=this['editor'],_0x4d9d83=_0x1c00aa['plugins']['get']('PasteFromOffice'),_0x496ae4=_0x1c00aa['editing']['view']['document'],_0x26270c=new MSOfficeInlineStylePropagator(_0x496ae4);_0x4d9d83['registerNormalizer'](_0x26270c,_0x584e44['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x42d70b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5200a0;for(const _0x5dd5a3 in _0x42d70b){const _0x21382a=_0x5dd5a3,_0x5b0026=_0x42d70b[_0x21382a];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x5b0026||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x5b0026){delete _0x42d70b[_0x21382a],_0x5200a0=_0x5b0026,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x5200a0&&_0x42d70b['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x5200a0&&_0x42d70b['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x5200a0&&_0x42d70b['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x5200a0&&_0x42d70b['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x5200a0&&_0x42d70b['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x5200a0&&_0x42d70b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x367eaf{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x33780c,PasteFromOfficeEnhancedInliner,PasteFromOfficeEnhancedPropagator];}}export{PasteFromOfficeEnhanced};
|
|
23
|
+
import{Plugin as _0x223902}from'@ckeditor/ckeditor5-core';import{PasteFromOffice as _0x382b04,PasteFromOfficeMSWordNormalizer as _0x535b2e}from'@ckeditor/ckeditor5-paste-from-office';import{priorities as _0x3d1437,uid as _0x154e62}from'@ckeditor/ckeditor5-utils';import{ViewDocument as _0x20e32e,ViewDomConverter as _0x549d18,ViewUpcastWriter as _0x203b04}from'@ckeditor/ckeditor5-engine';const f=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0xab4cdf){return f['test'](_0xab4cdf);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x4467be,_0x4f1624){const _0x144096=new Map();for(const [_0x1eb9b8,_0x575570]of _0x4f1624){if(!_0x1eb9b8['tagName']&&!_0x1eb9b8['className'])continue;const _0x26bcef=!_0x1eb9b8['tagName']||_0x4467be['name']===_0x1eb9b8['tagName'],_0x4363f3=!_0x1eb9b8['className']||_0x4467be['hasClass'](_0x1eb9b8['className']);_0x26bcef&&_0x4363f3&&_0x144096['set'](_0x1eb9b8,_0x575570);}return _0x144096;}function m(_0x4af2fe){const _0x5b16e6={};for(let _0x23e824=0x0;_0x23e824<_0x4af2fe['length'];_0x23e824++){const _0x39b021=_0x4af2fe[_0x23e824],_0x97d316=_0x4af2fe['getPropertyValue'](_0x39b021);'initial'!==_0x97d316&&(_0x5b16e6[_0x39b021]=_0x97d316);}return _0x5b16e6;}function w(_0x4bd3e1){const _0x3cc646=_0x4bd3e1['split'](',')['map'](_0x506bce=>_0x506bce['trim']()),_0x2cd0dc=[];for(const _0x1a5d6b of _0x3cc646){const _0x322391=l['exec'](_0x1a5d6b);_0x322391&&_0x2cd0dc['push'](_0x322391['groups']);}return _0x2cd0dc;}function y(_0x12e9a4){const _0x1f1a8d={};for(const _0xf54a3a of _0x12e9a4)Object['assign'](_0x1f1a8d,_0xf54a3a);return _0x1f1a8d;}var g=class extends _0x535b2e{['execute'](_0x5bd142){const {styles:_0x5b38ef,stylesString:_0x4ec3c5}=_0x5bd142['extraContent'],_0x4d675e=new _0x203b04(_0x5bd142['content']['document']),_0x153c09=_0x4d675e['createRangeIn'](_0x5bd142['content']),_0x5de40e=function(_0x5a20d0){const _0x3674a2=new Map();for(const _0x3c2b9f in _0x5a20d0){const _0x53eb8f=w(_0x3c2b9f),_0x4011a5=_0x5a20d0[_0x3c2b9f];for(const _0xd1a54e of _0x53eb8f)_0x3674a2['set'](_0xd1a54e,_0x4011a5);}return _0x3674a2;}(function(_0x2da1d4){const _0x4224dd={};for(const _0x250b23 of _0x2da1d4)for(const _0x4663a8 of _0x250b23['cssRules'])if(_0x4663a8 instanceof CSSStyleRule){const _0x227218=m(_0x4663a8['style']);_0x4224dd[_0x4663a8['selectorText']]=Object['assign']({},_0x4224dd[_0x4663a8['selectorText']]||{},_0x227218);}return _0x4224dd;}(_0x5b38ef)),_0x70665d=function(_0x1a782a){const _0x250911={},_0x146e58=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x4476e7=/\.(?<className>[\w-]+)/g;let _0xa64955;for(;null!==(_0xa64955=_0x146e58['exec'](_0x1a782a));){const {selector:_0x55b8e6,color:_0x337600,patternType:_0x324de6}=_0xa64955['groups'];if('auto'!==_0x337600['toLowerCase']()&&'none'!==_0x324de6['toLowerCase']()&&'auto'!==_0x324de6['toLowerCase']()){for(const _0xeede82 of _0x55b8e6['matchAll'](_0x4476e7))_0x250911[_0xeede82['groups']['className']]=_0x337600;}}return _0x250911;}(_0x4ec3c5);for(const _0x514b75 of _0x153c09){if('elementStart'!==_0x514b75['type'])continue;const _0xb001d2=_0x514b75['item'],_0x50f3ab=d(_0xb001d2,_0x5de40e),_0x3fa29a=_0x50f3ab['size']?y(Array['from'](_0x50f3ab['values']())):{};if(!('background-color'in _0x3fa29a)&&!('background'in _0x3fa29a)){for(const [_0x2b87fe,_0x3a4bd0]of Object['entries'](_0x70665d))if(_0xb001d2['hasClass'](_0x2b87fe)){_0x3fa29a['background-color']=_0x3a4bd0;break;}}for(const _0x6a3a3d in _0x3fa29a)_0xb001d2['hasStyle'](_0x6a3a3d)||_0x4d675e['setStyle'](_0x6a3a3d,_0x3fa29a[_0x6a3a3d],_0xb001d2);}}['isActive'](_0x2725dd){return super['isActive'](_0x2725dd)||u(_0x2725dd);}},p=class extends _0x223902{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x382b04];}['init'](){const _0x36aae4=this['editor'],_0x58e410=_0x36aae4['plugins']['get']('PasteFromOffice'),_0xbcd92b=_0x36aae4['editing']['view']['document'],_0x1fc269=new g(_0xbcd92b);_0x58e410['registerNormalizer'](_0x1fc269,_0x3d1437['high']+0xb);}['afterInit'](){!async function(_0x1f81bc){const _0x15c778='sG65Crk1cd2igLN7zIEAYju9J3hbPBtnFMxQf4HwZal0qTSVKyDmoRvUXepWO8',_0x5c6178=0x78de0,_0x322476=window['Date']['now'](),_0x2508dc=_0x1f81bc['editor'],_0x18dd71=new window['Promise'](_0x19c108=>{_0x2508dc['once']('ready',_0x19c108);}),_0x13407a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3c25e8=_0x2508dc['config']['get']('licenseKey');async function _0x5c8680(){let _0x39ac2a,_0x1306a0=null,_0x22d2c0=null;try{return'GPL'==_0x3c25e8?'NotAllowed':(_0x39ac2a=_0x25d18b(),_0x39ac2a?(_0x39ac2a['usageEndpoint']&&(_0x22d2c0=_0x536c7f(_0x39ac2a['usageEndpoint'],_0x39ac2a['jti'])),await _0x3041fa()?_0x5adc89()?_0x3cc935()?'Expired':_0x597810()?('evaluation'==_0x39ac2a['licenseType']&&(_0x1306a0=_0x5c2134('EvaluationLimit')),await _0x27250b()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3cc935(){const _0x10bf87=['evaluation','trial']['includes'](_0x39ac2a['licenseType'])?_0x322476/0x3e8:0xe10*_0x5c6178;return _0x39ac2a['exp']<_0x10bf87;}function _0x5adc89(){const _0x1201ff=_0x39ac2a['features'];return!!_0x1201ff&&(!!_0x1201ff['includes']('*')||(!!_0x1201ff['includes']('POE')||(!!_0x1201ff['includes']('PP')||!(!_0x1201ff['includes']('TRILIUM')||!_0x305e5b()))));}function _0x597810(){const _0xab6345=_0x39ac2a['licensedHosts'];if(!_0xab6345||0x0==_0xab6345['length'])return!0x0;const {hostname:_0x38afda}=new URL(window['location']['href']);if(_0xab6345['includes'](_0x38afda))return!0x0;const _0x2138a3=_0x38afda['split']('.');return _0xab6345['filter'](_0x243e9d=>_0x243e9d['includes']('*'))['map'](_0x14d50d=>_0x14d50d['split']('.'))['filter'](_0x3d78b7=>_0x3d78b7['length']<=_0x2138a3['length'])['map'](_0x26d733=>Array(_0x2138a3['length']-_0x26d733['length'])['fill']('*'===_0x26d733[0x0]?'*':'')['concat'](_0x26d733))['some'](_0x1e2588=>_0x2138a3['every']((_0x424ddf,_0x5940f4)=>_0x1e2588[_0x5940f4]===_0x424ddf||'*'===_0x1e2588[_0x5940f4]));}function _0x27250b(){return _0x1306a0&&_0x22d2c0?new window['Promise']((_0x1c63db,_0x17f955)=>{_0x1306a0['then'](_0x1c63db,_0x17f955),_0x22d2c0['then'](_0x4b9507=>{'Valid'!=_0x4b9507&&_0x1c63db(_0x4b9507);},_0x17f955);}):_0x1306a0||_0x22d2c0||'Valid';}}function _0x536c7f(_0x4ae9d3,_0x2f54ed){return new window['Promise'](_0x636a95=>{if(_0x2540a2())return _0x636a95('Valid');_0x12722c(),_0x2508dc['decorate']('_sendUsageRequest');let _0x1f8a55=!0x1;const _0x39330a=_0x154e62();function _0x2b1aec(_0xb78b7f){return!!_0xb78b7f&&('object'==typeof _0xb78b7f||'function'==typeof _0xb78b7f)&&'function'==typeof _0xb78b7f['then']&&'function'==typeof _0xb78b7f['catch'];}function _0xd0e741(_0x406ae5){_0x22499b(_0x406ae5)['then'](_0x3885b0=>_0x3885b0&&'ok'==_0x3885b0['status']?_0x2cf2ca(_0x3e029e(_0x39330a+_0x2f54ed))!=_0x3885b0['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x59013f=>(_0x4102da(),_0x59013f),()=>{const _0x118709=_0x436224();return null==_0x118709?(_0x4102da(),'Valid'):_0x322476-_0x118709>0x240c8400?'UsageLimit':'Valid';})['then'](_0x636a95)['catch'](()=>{_0x636a95('UsageLimit');});const _0x178423=0x36ee80;function _0x4102da(){const _0x31f83f='llct-'+_0x2cf2ca(_0x3e029e(_0x4ae9d3)),_0xb364b4=_0x379833(_0x2cf2ca(window['Math']['ceil'](_0x322476/_0x178423)));window['localStorage']['setItem'](_0x31f83f,_0xb364b4);}function _0x436224(){const _0x443b97='llct-'+_0x2cf2ca(_0x3e029e(_0x4ae9d3)),_0x592f03=window['localStorage']['getItem'](_0x443b97);return _0x592f03?window['parseInt'](_0x379833(_0x592f03),0x10)*_0x178423:null;}function _0x22499b(_0x2da53d){return new window['Promise']((_0x404ba6,_0xcdde64)=>{_0x2da53d['then'](_0x404ba6,_0xcdde64),window['setTimeout'](_0xcdde64,0x1d4c0);});}}_0x2508dc['on']('_sendUsageRequest',(_0x5f3917,_0x38edbe)=>{if(_0x38edbe[0x0]!=_0x4ae9d3)return _0x636a95('UsageLimit');_0x38edbe[0x1]={..._0x38edbe[0x1],'requestId':_0x39330a};},{'priority':'high'}),_0x2508dc['on']('_sendUsageRequest',_0x2db1fd=>{_0x2b1aec(_0x2db1fd['return'])&&(_0x1f8a55=!0x0,_0xd0e741(_0x2db1fd['return']));},{'priority':'low'}),_0x18dd71['then'](()=>{_0x1f8a55||_0x636a95('UsageLimit');});});function _0x2540a2(){return'auto'==_0x2508dc['editing']['view']['_overlayModeHint'];}function _0x12722c(){_0x2508dc['editing']['view']['_overlayModeHint']='auto';}}function _0x5c2134(_0x5cdcee){const _0x173df1=[new window['Promise'](_0x113019=>setTimeout(_0x113019,0x93ecc)),_0x18dd71['then'](()=>new window['Promise'](_0x2d4c0f=>{let _0x4f6258=0x0;_0x2508dc['model']['on']('applyOperation',(_0x4b56b2,_0x39ca74)=>{_0x39ca74[0x0]['isDocumentOperation']&&_0x4f6258++,0x5e8==_0x4f6258&&(_0x2d4c0f(),_0x4b56b2['off']());});}))];return window['Promise']['race'](_0x173df1)['then'](()=>_0x5cdcee);}async function _0x1e3521(){await _0x18dd71,_0x2508dc['model']['change']=_0x4140f6,_0x2508dc['model']['enqueueChange']=_0x4140f6,_0x2508dc['enableReadOnlyMode']('model');}function _0x305e5b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x11964b(_0x4bb0c3){const _0x2a08f4=_0x46bde1();_0x2508dc[_0x2a08f4]='pasteFromOfficeEnhancedLicenseKey'+_0x4bb0c3,'Valid'!=_0x4bb0c3&&_0x1e3521();}function _0x46bde1(){const _0x387bc7=window['String'](window['performance']['now']())['replace']('.','');let _0x554404='s';for(let _0x27d034=0x0;_0x27d034<_0x387bc7['length'];_0x27d034+=0x2){let _0x153507=window['parseInt'](_0x387bc7['substring'](_0x27d034,_0x27d034+0x2));_0x153507>=0x3e&&(_0x153507-=0x3e),_0x554404+=_0x15c778[_0x153507];}return _0x554404;}function _0x25d18b(){const _0x1ccc6a=_0x3c25e8['split']('.');if(0x3!=_0x1ccc6a['length'])return null;return _0x57be07(_0x1ccc6a[0x1]);function _0x57be07(_0xe00dce){const _0x966765=_0x530ed5(_0xe00dce);return _0x966765&&_0x375352()?_0x966765:null;function _0x375352(){const _0x3f6587=_0x966765['jti'],_0x375289=window['parseInt'](_0x3f6587['substring'](_0x3f6587['length']-0x8),0x10),_0x54b506={..._0x966765,'jti':_0x3f6587['substring'](0x0,_0x3f6587['length']-0x8)};return delete _0x54b506['vc'],_0x3e029e(_0x54b506)==_0x375289;}}}async function _0x3041fa(){let _0x2fd370=!0x0;try{const [_0x4ff157,_0x212cc0,_0x449f2e]=_0x3c25e8['split']('.');return _0x56dc5c(_0x4ff157),await _0x49558a(_0x4ff157,_0x212cc0,_0x449f2e),_0x2fd370;}catch{return!0x1;}function _0x56dc5c(_0x52c4d3){const _0x259e1b=_0x530ed5(_0x52c4d3);_0x259e1b&&'ES256'==_0x259e1b['alg']||(_0x2fd370=!0x1);}async function _0x49558a(_0x2aa969,_0x58f812,_0xd70e95){const _0x57e27b=window['Uint8Array']['from'](_0x4c2cfa(_0xd70e95),_0x4750b1=>_0x4750b1['charCodeAt'](0x0)),_0x484eec=new window['TextEncoder']()['encode'](_0x2aa969+'.'+_0x58f812),_0x8d7d1b=window['crypto']['subtle'];if(!_0x8d7d1b)return;const _0x17ae55=await _0x8d7d1b['importKey']('jwk',_0x13407a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x8d7d1b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x17ae55,_0x57e27b,_0x484eec)||(_0x2fd370=!0x1);}}function _0x530ed5(_0x5ba1d1){return _0x5ba1d1['startsWith']('ey')?JSON['parse'](_0x4c2cfa(_0x5ba1d1)):null;}function _0x4c2cfa(_0x1aeb20){return window['atob'](_0x1aeb20['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3e029e(_0x4836cf){let _0x21d01a=0x1505;function _0x5b7eae(_0x4bdf25){for(let _0x14f82f=0x0;_0x14f82f<_0x4bdf25['length'];_0x14f82f++){const _0x2e899b=_0x4bdf25['charCodeAt'](_0x14f82f);_0x21d01a=(_0x21d01a<<0x5)+_0x21d01a+_0x2e899b,_0x21d01a&=_0x21d01a;}}function _0x202c6f(_0x29c2ac){Array['isArray'](_0x29c2ac)?_0x29c2ac['forEach'](_0x202c6f):_0x29c2ac&&'object'==typeof _0x29c2ac?Object['entries'](_0x29c2ac)['sort']()['forEach'](([_0x411929,_0xb9be6c])=>{_0x5b7eae(_0x411929),_0x202c6f(_0xb9be6c);}):_0x5b7eae(window['String'](_0x29c2ac));}return _0x202c6f(_0x4836cf),_0x21d01a>>>0x0;}function _0x2cf2ca(_0x316e7c){return _0x316e7c['toString'](0x10)['padStart'](0x8,'0');}function _0x379833(_0x7b216a){return _0x7b216a['split']('')['reverse']()['join']('');}function _0x4140f6(){}_0x11964b(await _0x5c8680());}(this);}};const h=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],O=['color','font-family','font-size'],L={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x23a156=>Number(_0x23a156)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function E(_0x35866c){return h['includes'](_0x35866c);}function v(_0x7d3fe3){return Array['from'](_0x7d3fe3['getStyleNames']())['filter'](E);}function F(_0x3db097,_0x1d9b6e,_0x1d563e){const {spanStyles:_0x2819fc,stylesToBeHtmlElements:_0x4e919e}=K(_0x3db097,_0x1d563e);!function(_0x5d2f6b,_0x42d665,_0x31650f){for(const _0x21c299 in _0x31650f)_0x31650f[_0x21c299]['forEach'](([,_0x2a62a3])=>{const _0x9bb78=_0x42d665['createElement'](_0x2a62a3,[],_0x5d2f6b['getChildren']());_0x42d665['insertChild'](0x0,_0x9bb78,_0x5d2f6b);}),_0x42d665['removeStyle'](_0x21c299,_0x5d2f6b);}(_0x3db097,_0x1d9b6e,_0x4e919e),function(_0x42f639,_0xbdb266,_0x1481e3){if(!Object['keys'](_0x1481e3)['length'])return;const _0x2f3921=_0xbdb266['createElement']('span',[],_0x42f639['getChildren']());_0xbdb266['setStyle'](_0x1481e3,_0x2f3921),_0xbdb266['insertChild'](0x0,_0x2f3921,_0x42f639),_0xbdb266['removeStyle'](Object['keys'](_0x1481e3),_0x42f639);}(_0x3db097,_0x1d9b6e,_0x2819fc);}function P(_0x3f8fb2,_0x2f0360,_0x227bb5){const {spanStyles:_0x19caca}=K(_0x3f8fb2,_0x227bb5),_0x1f7c01=Object['keys'](_0x19caca);if(!_0x1f7c01['length'])return;let _0x121a38=!0x1;for(const _0x1f29a2 of _0x3f8fb2['getChildren']())if(_0x1f29a2['is']('element','span')){_0x121a38=!0x0;for(const [_0x39fe5c,_0x591e96]of Object['entries'](_0x19caca))_0x1f29a2['hasStyle'](_0x39fe5c)||_0x2f0360['setStyle']({[_0x39fe5c]:_0x591e96},_0x1f29a2);}_0x121a38&&_0x2f0360['removeStyle'](_0x1f7c01,_0x3f8fb2);}function K(_0x5c8c30,_0x67f167){const _0x2a57d2={},_0x474fa2={};return _0x67f167['forEach'](_0xfa6cba=>{const _0x687230=_0x5c8c30['getStyle'](_0xfa6cba);if(_0x687230){if(function(_0x20ad71){return O['includes'](_0x20ad71);}(_0xfa6cba))_0x2a57d2[_0xfa6cba]=_0x687230;else{if(function(_0x1ccae8){return _0x1ccae8 in L;}(_0xfa6cba)){const _0x33a83b=_0x687230['split']('\x20');L[_0xfa6cba]['forEach'](([_0x4fbbc,_0x532281])=>{for(const _0xd0e885 of _0x33a83b)('function'==typeof _0x4fbbc&&_0x4fbbc(_0xd0e885)||_0x4fbbc===_0xd0e885)&&(_0x474fa2[_0xfa6cba]=[..._0x474fa2[_0xfa6cba]||[],[_0x4fbbc,_0x532281]]);});}}}}),{'spanStyles':_0x2a57d2,'stylesToBeHtmlElements':_0x474fa2};}var b=class extends _0x535b2e{['execute'](_0x502bfc){const _0x47b68a=new _0x203b04(_0x502bfc['content']['document']),_0x5ac3a7=_0x47b68a['createRangeIn'](_0x502bfc['content']),_0x3f8a6f=[...new _0x549d18(new _0x20e32e(_0x47b68a['document']['stylesProcessor']))['blockElements'],'font'],_0x5288d2=_0x5ac3a7['getItems']();for(const _0x2fbf7b of _0x5288d2)if(_0x2fbf7b['is']('element')&&_0x3f8a6f['includes'](_0x2fbf7b['name'])){if(_0x2fbf7b['hasStyle']('mso-list')&&'none'!==_0x2fbf7b['getStyle']('mso-list')){P(_0x2fbf7b,_0x47b68a,v(_0x2fbf7b));continue;}F(_0x2fbf7b,_0x47b68a,v(_0x2fbf7b));}}['isActive'](_0x5ccd78){return super['isActive'](_0x5ccd78)||u(_0x5ccd78);}},x=class extends _0x223902{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x382b04];}['init'](){const _0x2485e0=this['editor'],_0x1d042c=_0x2485e0['plugins']['get']('PasteFromOffice'),_0x17fb12=_0x2485e0['editing']['view']['document'],_0x47c878=new b(_0x17fb12);_0x1d042c['registerNormalizer'](_0x47c878,_0x3d1437['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x388bf1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x524b59;for(const _0x2033f3 in _0x388bf1){const _0x5e9244=_0x2033f3,_0x1cdd9e=_0x388bf1[_0x5e9244];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x1cdd9e||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x1cdd9e){delete _0x388bf1[_0x5e9244],_0x524b59=_0x1cdd9e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x524b59&&_0x388bf1['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x524b59&&_0x388bf1['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x524b59&&_0x388bf1['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x524b59&&_0x388bf1['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x524b59&&_0x388bf1['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x524b59&&_0x388bf1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},k=class extends _0x223902{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x382b04,p,x];}};export{k as PasteFromOfficeEnhanced};
|
package/dist/legacyerrors.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { ClipboardInputTransformationData } from
|
|
6
|
-
import { PasteFromOfficeMSWordNormalizer } from
|
|
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 { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
6
|
+
import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
* A normalizer that inlines styles passed along the content from MS Office.
|
|
9
|
+
*
|
|
10
|
+
* Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
|
|
11
|
+
* plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
12
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
13
|
+
*
|
|
14
|
+
* This particular normalizer turns a pasted content such as:
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <style>
|
|
18
|
+
* p { margin-top: 10px }
|
|
19
|
+
* .foo { font-family: Arial }
|
|
20
|
+
* <style>
|
|
21
|
+
* <p class="foo">Foo</p>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* into:
|
|
25
|
+
*
|
|
26
|
+
* ```html
|
|
27
|
+
* <style>
|
|
28
|
+
* p { margin-top: 10px }
|
|
29
|
+
* .foo { font-family: Arial }
|
|
30
|
+
* <style>
|
|
31
|
+
* <p class="foo" style="margin-top: 10px; font-family: Arial">Foo</p>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
34
|
export declare class MSOfficeStylesInliner extends PasteFromOfficeMSWordNormalizer {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override isActive(htmlString: string): boolean;
|
|
43
43
|
}
|
|
@@ -1,148 +1,148 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { type ViewElement } from
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/inliner/utils
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
type StyleSelector = string;
|
|
10
10
|
type CSSStyleDefinitions = Record<string, string>;
|
|
11
11
|
type ExtractedStyles = Record<StyleSelector, CSSStyleDefinitions>;
|
|
12
12
|
type ExpandedStyles = Map<ParsedCSSSelector, CSSStyleDefinitions>;
|
|
13
13
|
type ParsedCSSSelector = {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
tagName?: StyleSelector;
|
|
15
|
+
className?: StyleSelector;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
* Returns style definitions that match given element.
|
|
19
|
+
*
|
|
20
|
+
* @param element
|
|
21
|
+
* @param expandedStyles
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
24
|
export declare function getMatchingStyles(element: ViewElement, expandedStyles: ExpandedStyles): ExpandedStyles;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
* Converts CSSStyleSheets into a simple object format:
|
|
27
|
+
*
|
|
28
|
+
* ```js
|
|
29
|
+
* {
|
|
30
|
+
* 'p, p.foo': {
|
|
31
|
+
* 'font-family': 'Arial'
|
|
32
|
+
* },
|
|
33
|
+
* 'td': {
|
|
34
|
+
* 'background': 'red'
|
|
35
|
+
* },
|
|
36
|
+
* // ...
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
* @param styles
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
42
|
export declare function extractStyles(styles: Array<CSSStyleSheet>): ExtractedStyles;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
* Expands styles object with complex selector into a map of unique parsed selectors and style definitions.
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* const styles = {
|
|
48
|
+
* 'p, p.foo': {
|
|
49
|
+
* 'font-family': 'Arial'
|
|
50
|
+
* },
|
|
51
|
+
* 'td': {
|
|
52
|
+
* 'background': 'red'
|
|
53
|
+
* },
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
*
|
|
57
|
+
* expandStyles( styles );
|
|
58
|
+
*
|
|
59
|
+
* {
|
|
60
|
+
* { tagName: 'p' }: {
|
|
61
|
+
* 'font-family': 'Arial'
|
|
62
|
+
* },
|
|
63
|
+
* { tagName: 'p', className: 'foo }: {
|
|
64
|
+
* 'font-family': 'Arial'
|
|
65
|
+
* },
|
|
66
|
+
* { tagName: 'td' }: {
|
|
67
|
+
* 'background': 'red'
|
|
68
|
+
* },
|
|
69
|
+
* // ...
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
* @param styles
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
75
|
export declare function expandStyles(styles: ExtractedStyles): ExpandedStyles;
|
|
76
76
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
* Converts a native CSSStyleDeclaration into a simple object.
|
|
78
|
+
*
|
|
79
|
+
* ```ts
|
|
80
|
+
* {
|
|
81
|
+
* 'font-family': 'Arial'
|
|
82
|
+
* 'background': 'red',
|
|
83
|
+
* // ...
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
* @param declaration
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
89
|
export declare function parseCSSStyleDeclaration(declaration: CSSStyleDeclaration): CSSStyleDefinitions;
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
91
|
+
* Parses CSS selector into an array of objects with tagName and className properties.
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* parseCSSSelector( 'p, p.foo' );
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* returns:
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* [
|
|
101
|
+
* { tagName: 'p' },
|
|
102
|
+
* { tagName: 'p', className: 'foo' }
|
|
103
|
+
* ]
|
|
104
|
+
* ```
|
|
105
|
+
* @param selector
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
108
|
export declare function parseCSSSelector(selector: string): Array<ParsedCSSSelector>;
|
|
109
109
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
110
|
+
* Extracts `mso-pattern` background colors from raw CSS text (`stylesString`).
|
|
111
|
+
*
|
|
112
|
+
* Browsers silently discard `mso-*` vendor properties during CSS parsing, so the browser-parsed
|
|
113
|
+
* `CSSStyleSheet` objects never contain `mso-pattern` values. This function parses the raw CSS text
|
|
114
|
+
* to extract pattern colors from class-scoped rules.
|
|
115
|
+
*
|
|
116
|
+
* Returns a mapping of class names to their pattern colors (e.g., `{ xl65: '#4EA72E' }`).
|
|
117
|
+
*
|
|
118
|
+
* Conditions for synthesizing a background-color:
|
|
119
|
+
* - `mso-pattern: auto` (no pattern set) — skipped (single value doesn't match the regex).
|
|
120
|
+
* - `mso-pattern: <color> none` — skipped (pattern explicitly off).
|
|
121
|
+
* - `mso-pattern: <color> auto` — skipped (no pattern).
|
|
122
|
+
* - `mso-pattern: auto none` — skipped (color is `auto`).
|
|
123
|
+
* - `mso-pattern: <color> <pattern-type>` where pattern type is not `none`/`auto` — extracted.
|
|
124
|
+
*
|
|
125
|
+
* @param stylesString Raw CSS text from `data._parsedData.stylesString`.
|
|
126
|
+
* @returns A record mapping class names to their `mso-pattern` color values.
|
|
127
|
+
*/
|
|
128
128
|
export declare function extractMsoPatternBackgroundColors(stylesString: string): Record<string, string>;
|
|
129
129
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
130
|
+
* Flattens multiple style definitions considering their order to simulate a CSS cascade.
|
|
131
|
+
*
|
|
132
|
+
* ```ts
|
|
133
|
+
* flattenStyleDefinitions( [
|
|
134
|
+
* { 'font-family': 'Arial', 'margin-top': '1px', 'font-size': '10px' },
|
|
135
|
+
* { 'font-family': 'monospace', 'margin-top': '3px' }
|
|
136
|
+
* ] );
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* returns:
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* { 'font-family': 'monospace', 'margin-top': '3px', 'font-size': '10px' }
|
|
143
|
+
* ```
|
|
144
|
+
* @param definitions
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
147
|
export declare function flattenStyleDefinitions(definitions: Array<CSSStyleDefinitions>): CSSStyleDefinitions;
|
|
148
148
|
export {};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import type { ClipboardInputTransformationData } from
|
|
9
|
-
import { PasteFromOfficeMSWordNormalizer } from
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/propagator/msofficeinlinestylepropagator
|
|
7
|
+
*/
|
|
8
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
9
|
+
import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
38
|
export declare class MSOfficeInlineStylePropagator extends PasteFromOfficeMSWordNormalizer {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
override isActive(htmlString: string): boolean;
|
|
47
47
|
}
|
|
@@ -1,117 +1,115 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import type { ViewUpcastWriter, ViewElement } from
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/propagator/utils
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
* The list of all `CSS` properties that need to be propagated.
|
|
11
|
+
*
|
|
12
|
+
* @protected
|
|
13
|
+
*/
|
|
14
14
|
export declare const CSS_PROPERTIES_TO_PROPAGATE: readonly ["color", "font-family", "font-size", "text-decoration", "text-decoration-line", "font-weight", "font-style", "vertical-align"];
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
* The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
|
|
17
|
+
*
|
|
18
|
+
* It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
|
|
19
|
+
*
|
|
20
|
+
* @protected
|
|
21
|
+
*/
|
|
22
22
|
export declare const CSS_PROPERTIES_TO_BE_SPANS: readonly ["color", "font-family", "font-size"];
|
|
23
23
|
export type CSSPropertyValueAssertion = (value: string) => boolean;
|
|
24
24
|
export type CSSPropertyValueToElementNameMap = readonly [string | CSSPropertyValueAssertion, string];
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: {
|
|
33
|
-
[key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap>;
|
|
34
|
-
};
|
|
26
|
+
* The map of style to element propagate as a HTML elements
|
|
27
|
+
* (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
|
|
28
|
+
* or `font-weight` with the `bold` value is propagated to `<strong>`).
|
|
29
|
+
*
|
|
30
|
+
* @protected
|
|
31
|
+
*/
|
|
32
|
+
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: { [key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap> };
|
|
35
33
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
* Checks whether the given property should be propagated at all.
|
|
35
|
+
*
|
|
36
|
+
* @param property
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
41
39
|
export declare function isPropertyToBePropagated(property: string): property is typeof CSS_PROPERTIES_TO_PROPAGATE[number];
|
|
42
40
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
* Checks whether the given property should be propagated as a span element.
|
|
42
|
+
*
|
|
43
|
+
* @param property
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
48
46
|
export declare function isPropertyToBePropagatedAsSpan(property: string): property is typeof CSS_PROPERTIES_TO_BE_SPANS[number];
|
|
49
47
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
* Checks whether the given property should be propagated as an HTML element.
|
|
49
|
+
*
|
|
50
|
+
* @param property
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
55
53
|
export declare function isPropertyToBePropagatedAsHTMLElement(property: string): property is keyof typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;
|
|
56
54
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
* Collects a list of styles to propagate from a block element.
|
|
56
|
+
*
|
|
57
|
+
* @param element The source `ViewElement`.
|
|
58
|
+
* @returns List of valid CSS properties to propagate.
|
|
59
|
+
*/
|
|
62
60
|
export declare function getStylePropertyNamesToPropagate(element: ViewElement): Array<typeof CSS_PROPERTIES_TO_PROPAGATE[number]>;
|
|
63
61
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
* Executes styles propagation.
|
|
63
|
+
*
|
|
64
|
+
* @param element The source `ViewElement`.
|
|
65
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
66
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
67
|
+
*/
|
|
70
68
|
export declare function propagateStyleProperties(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
71
69
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
* Creates an `HTML` structure based on styles propagated from parent block element.
|
|
71
|
+
*
|
|
72
|
+
* @param element The source `ViewElement`.
|
|
73
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
74
|
+
* @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
|
|
75
|
+
*/
|
|
78
76
|
export declare function propagateStylesAsHTMLElements(element: ViewElement, writer: ViewUpcastWriter, stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>): void;
|
|
79
77
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
78
|
+
* Propagates span styles from a block element to its existing direct `<span>` children, instead of
|
|
79
|
+
* creating a new wrapper `<span>`. Use this for list-item paragraphs where adding a wrapper would
|
|
80
|
+
* shift the span depth and break `findListMarkerNode()` bullet detection. See #6129.
|
|
81
|
+
*
|
|
82
|
+
* HTML-element style properties (`font-weight`, `font-style`, and similar) are intentionally not
|
|
83
|
+
* propagated here — promoting them would require wrapping children in `<strong>`, `<em>`, etc.,
|
|
84
|
+
* which shifts span depth just as much as `propagateStylesAsSpan()` and defeats the purpose.
|
|
85
|
+
*
|
|
86
|
+
* In practice this is safe because Word does not emit `font-weight` / `font-style` / `text-decoration`
|
|
87
|
+
* directly on list-item `<p>` elements — those styles live on inner `<span>` character-style wrappers,
|
|
88
|
+
* which are preserved untouched. They could only land on the `<p>` via a class-based rule like
|
|
89
|
+
* `p.MsoListParagraph { font-weight: bold }` promoted by `MSOfficeStylesInliner`, which standard
|
|
90
|
+
* Word HTML does not produce.
|
|
91
|
+
*
|
|
92
|
+
* @param element The source `ViewElement`.
|
|
93
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
94
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
95
|
+
*/
|
|
98
96
|
export declare function propagateSpanStylesToExistingChildren(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
99
97
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
* Creates a `span` as a first child of the `element` with styles propagated from parent block element.
|
|
99
|
+
*
|
|
100
|
+
* @param element The source `ViewElement`.
|
|
101
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
102
|
+
* @param spanStyles List of styles properties to propagate.
|
|
103
|
+
*/
|
|
106
104
|
export declare function propagateStylesAsSpan(element: ViewElement, writer: ViewUpcastWriter, spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>): void;
|
|
107
105
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
* Collects and filters element styles into proper objects for further propagation.
|
|
107
|
+
*
|
|
108
|
+
* @param element The source `ViewElement`.
|
|
109
|
+
* @param propertiesToPropagate The array of style properties to propagate.
|
|
110
|
+
* @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
|
|
111
|
+
*/
|
|
114
112
|
export declare function getStylesToPropagate(element: ViewElement, propertiesToPropagate: Array<string>): {
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
|
|
114
|
+
stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
|
|
117
115
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { Plugin } from
|
|
10
|
-
import { PasteFromOffice } from
|
|
11
|
-
import { PasteFromOfficeEnhancedInliner } from
|
|
12
|
-
import { PasteFromOfficeEnhancedPropagator } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhanced
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
11
|
+
import { PasteFromOfficeEnhancedInliner } from "./pastefromofficeenhancedinliner.js";
|
|
12
|
+
import { PasteFromOfficeEnhancedPropagator } from "./pastefromofficeenhancedpropagator.js";
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
* The Paste from Office Enhanced feature.
|
|
15
|
+
*
|
|
16
|
+
* Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
|
|
17
|
+
* and more efficient workflow.
|
|
18
|
+
*
|
|
19
|
+
* For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
|
|
20
|
+
*/
|
|
21
21
|
export declare class PasteFromOfficeEnhanced extends Plugin {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "PasteFromOfficeEnhanced";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static override get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static override get isPremiumPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice, PasteFromOfficeEnhancedInliner, PasteFromOfficeEnhancedPropagator]>;
|
|
38
38
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { PasteFromOffice } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhancedinliner
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
|
|
12
|
+
*/
|
|
13
13
|
export declare class PasteFromOfficeEnhancedInliner extends Plugin {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "PasteFromOfficeEnhancedInliner";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static override get isOfficialPlugin(): true;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static override get isPremiumPlugin(): true;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
afterInit(): void;
|
|
38
38
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { PasteFromOffice } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhancedpropagator
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
|
|
12
|
+
* * `span` element with `style` properties,
|
|
13
|
+
* * `HTML` structures based block element styles.
|
|
14
|
+
*/
|
|
15
15
|
export declare class PasteFromOfficeEnhancedPropagator extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "PasteFromOfficeEnhancedPropagator";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static override get isOfficialPlugin(): true;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static override get isPremiumPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
override destroy(): void;
|
|
40
40
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
* Check if content was pasted from MS Excel.
|
|
7
|
+
*
|
|
8
|
+
* @param html
|
|
9
|
+
* @returns True if content is pasted from MS Excel
|
|
10
|
+
*/
|
|
11
11
|
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": "48.
|
|
3
|
+
"version": "48.3.0-alpha.0",
|
|
4
4
|
"description": "Enhanced paste from Office feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ckeditor/ckeditor5-clipboard": "48.
|
|
35
|
-
"@ckeditor/ckeditor5-core": "48.
|
|
36
|
-
"@ckeditor/ckeditor5-engine": "48.
|
|
37
|
-
"@ckeditor/ckeditor5-paste-from-office": "48.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
34
|
+
"@ckeditor/ckeditor5-clipboard": "48.3.0-alpha.0",
|
|
35
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
|
|
37
|
+
"@ckeditor/ckeditor5-paste-from-office": "48.3.0-alpha.0",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|