@ckeditor/ckeditor5-paste-from-office-enhanced 48.8.1-alpha.4 → 49.0.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 -38
- package/dist/normalizers/inliner/utils.d.ts +125 -125
- package/dist/normalizers/propagator/msofficeinlinestylepropagator.d.ts +43 -39
- 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 _0x222a13}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x531cc5,PasteFromOffice as _0x138f84,parsePasteOfficeHtml as _0x23183b}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x139688,uid as _0x343d20}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x319d19,ViewDocument as _0x26a59f,ViewDomConverter as _0x2f4628}from'@ckeditor/ckeditor5-engine/dist/index.js';const u=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function l(_0x425678){return u['test'](_0x425678);}const d=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function w(_0x332267,_0x42248b){const _0x32c7b0=new Map();for(const [_0x4bdf37,_0x58c455]of _0x42248b){if(!_0x4bdf37['tagName']&&!_0x4bdf37['className'])continue;const _0x19d6b1=!_0x4bdf37['tagName']||_0x332267['name']===_0x4bdf37['tagName'],_0x28d358=!_0x4bdf37['className']||_0x332267['hasClass'](_0x4bdf37['className']);_0x19d6b1&&_0x28d358&&_0x32c7b0['set'](_0x4bdf37,_0x58c455);}return _0x32c7b0;}function m(_0x31f84c){const _0x2db30b={};for(let _0x5e0552=0x0;_0x5e0552<_0x31f84c['length'];_0x5e0552++){const _0x2b4242=_0x31f84c[_0x5e0552],_0x5ca6ca=_0x31f84c['getPropertyValue'](_0x2b4242);'initial'!==_0x5ca6ca&&(_0x2db30b[_0x2b4242]=_0x5ca6ca);}return _0x2db30b;}function p(_0x163b72){const _0xa6680=_0x163b72['split'](',')['map'](_0x4f9305=>_0x4f9305['trim']()),_0x19eb06=[];for(const _0x3c762f of _0xa6680){const _0x472d58=d['exec'](_0x3c762f);_0x472d58&&_0x19eb06['push'](_0x472d58['groups']);}return _0x19eb06;}function y(_0x3f6595){const _0x274cfb={};for(const _0x36d778 of _0x3f6595)Object['assign'](_0x274cfb,_0x36d778);return _0x274cfb;}class MSOfficeStylesInliner extends _0x531cc5{['execute'](_0xb19e6a){const {body:_0x54da10,styles:_0xc5c6aa,stylesString:_0x491a94}=_0xb19e6a['_parsedData'],_0x35505a=new _0x319d19(_0x54da10['document']),_0x22e92b=_0x35505a['createRangeIn'](_0x54da10),_0x3d2786=function(_0x3555fb){const _0x154835={};for(const _0x4e0615 of _0x3555fb)for(const _0xbf748d of _0x4e0615['cssRules'])if(_0xbf748d instanceof CSSStyleRule){const _0x1bd59d=m(_0xbf748d['style']);_0x154835[_0xbf748d['selectorText']]=Object['assign']({},_0x154835[_0xbf748d['selectorText']]||{},_0x1bd59d);}return _0x154835;}(_0xc5c6aa),_0x2e057f=function(_0x21d845){const _0x163934=new Map();for(const _0x587150 in _0x21d845){const _0x673e56=p(_0x587150),_0x1d33f0=_0x21d845[_0x587150];for(const _0x2d1477 of _0x673e56)_0x163934['set'](_0x2d1477,_0x1d33f0);}return _0x163934;}(_0x3d2786),_0x2ce339=function(_0x302b4e){const _0x116a2c={},_0x4ea818=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x322785=/\.(?<className>[\w-]+)/g;let _0x59ef4a;for(;null!==(_0x59ef4a=_0x4ea818['exec'](_0x302b4e));){const {selector:_0x51326e,color:_0x3f6721,patternType:_0x4c45f5}=_0x59ef4a['groups'];if('auto'!==_0x3f6721['toLowerCase']()&&'none'!==_0x4c45f5['toLowerCase']()&&'auto'!==_0x4c45f5['toLowerCase']()){for(const _0x1b3c58 of _0x51326e['matchAll'](_0x322785))_0x116a2c[_0x1b3c58['groups']['className']]=_0x3f6721;}}return _0x116a2c;}(_0x491a94);for(const _0x123b78 of _0x22e92b){if('elementStart'!==_0x123b78['type'])continue;const _0x439d34=_0x123b78['item'],_0x31a56a=w(_0x439d34,_0x2e057f),_0x360aa3=_0x31a56a['size']?y(Array['from'](_0x31a56a['values']())):{};if(!('background-color'in _0x360aa3)&&!('background'in _0x360aa3)){for(const [_0x4e980e,_0xbdaa21]of Object['entries'](_0x2ce339))if(_0x439d34['hasClass'](_0x4e980e)){_0x360aa3['background-color']=_0xbdaa21;break;}}for(const _0x2ab733 in _0x360aa3)_0x439d34['hasStyle'](_0x2ab733)||_0x35505a['setStyle'](_0x2ab733,_0x360aa3[_0x2ab733],_0x439d34);}_0xb19e6a['content']=_0x54da10;}['isActive'](_0x48c387){return super['isActive'](_0x48c387)||l(_0x48c387);}}class PasteFromOfficeEnhancedInliner extends _0x222a13{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84];}['init'](){const _0xaec99b=this['editor'],_0x1a1fbb=_0xaec99b['plugins']['get']('ClipboardPipeline'),_0x5cf026=_0xaec99b['editing']['view']['document'],_0x46e0d3=new MSOfficeStylesInliner(_0x5cf026);_0x1a1fbb['on']('inputTransformation',(_0x1e989b,_0x44d148)=>{const _0x43c289=_0x44d148['dataTransfer']['getData']('text/html');_0x46e0d3['isActive'](_0x43c289)&&(_0x44d148['_parsedData']||(_0x44d148['_parsedData']=_0x23183b(_0x43c289,_0x5cf026['stylesProcessor'])),_0x46e0d3['execute'](_0x44d148));},{'priority':_0x139688['get']('high')+0xb});}['afterInit'](){!async function(_0x4931b0){const _0x6a0743=_0x213f37([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]),_0x3da863=0x7374585f,_0x2c6221=0x7373d2df^_0x3da863,_0x1fee3d=window[_0x213f37([0x44,0x61,0x74,0x65])][_0x213f37([0x6e,0x6f,0x77])](),_0x38cb84=_0x4931b0[_0x213f37([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x42bbc9=new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53729d=>{_0x38cb84[_0x213f37([0x6f,0x6e,0x63,0x65])](_0x213f37([0x72,0x65,0x61,0x64,0x79]),_0x53729d);}),_0x24b858={[_0x213f37([0x6b,0x74,0x79])]:_0x213f37([0x45,0x43]),[_0x213f37([0x75,0x73,0x65])]:_0x213f37([0x73,0x69,0x67]),[_0x213f37([0x63,0x72,0x76])]:_0x213f37([0x50,0x2d,0x32,0x35,0x36]),[_0x213f37([0x78])]:_0x213f37([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]),[_0x213f37([0x79])]:_0x213f37([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]),[_0x213f37([0x61,0x6c,0x67])]:_0x213f37([0x45,0x53,0x32,0x35,0x36])},_0x4ca719=_0x38cb84[_0x213f37([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x213f37([0x67,0x65,0x74])](_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34d2f1(){let _0x51e9e4,_0x373087=null,_0x2a6f42=null;try{if(_0x4ca719==_0x213f37([0x47,0x50,0x4c]))return _0x213f37([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x51e9e4=_0x555668(),!_0x51e9e4)return _0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x51e9e4[_0x213f37([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a6f42=_0x258ae3(_0x51e9e4[_0x213f37([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x51e9e4[_0x213f37([0x6a,0x74,0x69])])),await _0xb8ed66()?_0x2918af()?_0x17c8f8()?_0x213f37([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5b814d()?(_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x213f37([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x373087=_0x211198(_0x213f37([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x40b8e6()):_0x213f37([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x213f37([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x17c8f8(){const _0x153b78=[_0x213f37([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x213f37([0x74,0x72,0x69,0x61,0x6c])][_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1fee3d/0x3e8:0xe10*_0x2c6221;return _0x51e9e4[_0x213f37([0x65,0x78,0x70])]<_0x153b78;}function _0x2918af(){const _0x8d9ed3=_0x51e9e4[_0x213f37([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x8d9ed3&&(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x2a]))||(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x50,0x4f,0x45]))||(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x50,0x50]))||!(!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0xe2258e()))));}function _0x5b814d(){const _0x46523c=_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x46523c||0x0==_0x46523c[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x718895}=new URL(window[_0x213f37([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x46523c[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x718895))return!0x0;const _0x33854f=_0x718895[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e]));return _0x46523c[_0x213f37([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x377657=>_0x377657[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x2a])))[_0x213f37([0x6d,0x61,0x70])](_0x5ac8a5=>_0x5ac8a5[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e])))[_0x213f37([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1414d4=>_0x1414d4[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x33854f[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x213f37([0x6d,0x61,0x70])](_0x1736c4=>Array(_0x33854f[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1736c4[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x213f37([0x66,0x69,0x6c,0x6c])](_0x1736c4[0x0]===_0x213f37([0x2a])?_0x213f37([0x2a]):'')[_0x213f37([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1736c4))[_0x213f37([0x73,0x6f,0x6d,0x65])](_0x195583=>_0x33854f[_0x213f37([0x65,0x76,0x65,0x72,0x79])]((_0x121dba,_0x4ebf34)=>_0x195583[_0x4ebf34]===_0x121dba||_0x195583[_0x4ebf34]===_0x213f37([0x2a])));}function _0x40b8e6(){return _0x373087&&_0x2a6f42?new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a0967,_0x2525d3)=>{_0x373087[_0x213f37([0x74,0x68,0x65,0x6e])](_0x4a0967,_0x2525d3),_0x2a6f42[_0x213f37([0x74,0x68,0x65,0x6e])](_0x190123=>{_0x190123!=_0x213f37([0x56,0x61,0x6c,0x69,0x64])&&_0x4a0967(_0x190123);},_0x2525d3);}):_0x373087||_0x2a6f42||_0x213f37([0x56,0x61,0x6c,0x69,0x64]);}}function _0x258ae3(_0x59ae79,_0x1538bd){return new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d3710=>{if(_0x1b1d61())return _0x3d3710(_0x213f37([0x56,0x61,0x6c,0x69,0x64]));_0x16c5e4(),_0x38cb84[_0x213f37([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a9949=!0x1;const _0x5e6b6d=_0x343d20();function _0x5050e8(_0x57c60b){return!!_0x57c60b&&(typeof _0x57c60b===_0x213f37([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x57c60b===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x57c60b[_0x213f37([0x74,0x68,0x65,0x6e])]===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x57c60b[_0x213f37([0x63,0x61,0x74,0x63,0x68])]===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x172834(_0x6a003a){_0xbc7d52(_0x6a003a)[_0x213f37([0x74,0x68,0x65,0x6e])](_0x53e156=>{if(!_0x53e156||_0x53e156[_0x213f37([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x213f37([0x6f,0x6b]))return _0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x386904(_0x1e1d78(_0x5e6b6d+_0x1538bd))!=_0x53e156[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x213f37([0x56,0x61,0x6c,0x69,0x64]);})[_0x213f37([0x74,0x68,0x65,0x6e])](_0x3c619b=>(_0x2e76d2(),_0x3c619b),()=>{const _0x1ec6b2=_0x3f3d35();return null==_0x1ec6b2?(_0x2e76d2(),_0x213f37([0x56,0x61,0x6c,0x69,0x64])):_0x213f37(_0x1fee3d-_0x1ec6b2>(0x5778dc5f^_0x3da863)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x213f37([0x74,0x68,0x65,0x6e])](_0x3d3710)[_0x213f37([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3e0dea=0x7342b6df^_0x3da863;function _0x2e76d2(){const _0x4dc2cd=_0x213f37([0x6c,0x6c,0x63,0x74,0x2d])+_0x386904(_0x1e1d78(_0x59ae79)),_0x25b505=_0x37fa2e(_0x386904(window[_0x213f37([0x4d,0x61,0x74,0x68])][_0x213f37([0x63,0x65,0x69,0x6c])](_0x1fee3d/_0x3e0dea)));window[_0x213f37([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x213f37([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4dc2cd,_0x25b505);}function _0x3f3d35(){const _0x5394e6=_0x213f37([0x6c,0x6c,0x63,0x74,0x2d])+_0x386904(_0x1e1d78(_0x59ae79)),_0x379594=window[_0x213f37([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x213f37([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5394e6);return _0x379594?window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37fa2e(_0x379594),0x10)*_0x3e0dea:null;}function _0xbc7d52(_0x52f457){return new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6ea71b,_0x23968d)=>{_0x52f457[_0x213f37([0x74,0x68,0x65,0x6e])](_0x6ea71b,_0x23968d),window[_0x213f37([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23968d,0x73758c9f^_0x3da863);});}}_0x38cb84[_0x213f37([0x6f,0x6e])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1a7867,_0x2cb178)=>{if(_0x2cb178[0x0]!=_0x59ae79)return _0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2cb178[0x1]={..._0x2cb178[0x1],[_0x213f37([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5e6b6d};},{[_0x213f37([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x213f37([0x68,0x69,0x67,0x68])}),_0x38cb84[_0x213f37([0x6f,0x6e])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17f530=>{_0x5050e8(_0x17f530[_0x213f37([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a9949=!0x0,_0x172834(_0x17f530[_0x213f37([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x213f37([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x213f37([0x6c,0x6f,0x77])}),_0x42bbc9[_0x213f37([0x74,0x68,0x65,0x6e])](()=>{_0x1a9949||_0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1b1d61(){return _0x38cb84[_0x213f37([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x213f37([0x76,0x69,0x65,0x77])][_0x213f37([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x213f37([0x61,0x75,0x74,0x6f]);}function _0x16c5e4(){_0x38cb84[_0x213f37([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x213f37([0x76,0x69,0x65,0x77])][_0x213f37([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x213f37([0x61,0x75,0x74,0x6f]);}}function _0x211198(_0x364bc1){const _0x2f97f0=[new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7cc2b6=>setTimeout(_0x7cc2b6,0x737d6693^_0x3da863)),_0x42bbc9[_0x213f37([0x74,0x68,0x65,0x6e])](()=>new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d55b6=>{let _0x4fcd1e=0x0;_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x6f,0x6e])](_0x213f37([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x235544,_0x565425)=>{_0x565425[0x0][_0x213f37([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4fcd1e++,_0x4fcd1e==(0x73745db7^_0x3da863)&&(_0x5d55b6(),_0x235544[_0x213f37([0x6f,0x66,0x66])]());});}))];return window[_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x213f37([0x72,0x61,0x63,0x65])](_0x2f97f0)[_0x213f37([0x74,0x68,0x65,0x6e])](()=>_0x364bc1);}async function _0x8ee6bd(){await _0x42bbc9,_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33c314,_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33c314,_0x38cb84[_0x213f37([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x213f37([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xe2258e(){return window[_0x213f37([0x67,0x6c,0x6f,0x62])]&&window[_0x213f37([0x67,0x6c,0x6f,0x62])][_0x213f37([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1a5cdf(_0x3c1aa2){const _0x2637bb=_0x291b2d();_0x38cb84[_0x2637bb]=_0x213f37([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])+_0x3c1aa2,_0x3c1aa2!=_0x213f37([0x56,0x61,0x6c,0x69,0x64])&&_0x8ee6bd();}function _0x291b2d(){const _0x568cd9=window[_0x213f37([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x213f37([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x213f37([0x6e,0x6f,0x77])]())[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x213f37([0x2e]),'');let _0x2d4abd=_0x213f37([0x73]);for(let _0x3bc2b0=0x0;_0x3bc2b0<_0x568cd9[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3bc2b0+=0x2){let _0x355fd6=window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x568cd9[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3bc2b0,_0x3bc2b0+0x2));_0x355fd6>=_0x6a0743[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x355fd6-=_0x6a0743[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d4abd+=_0x6a0743[_0x355fd6];}return _0x2d4abd;}function _0x555668(){const _0x2cf696=_0x4ca719[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e]));if(0x3!=_0x2cf696[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x36d387(_0x2cf696[0x1]);function _0x36d387(_0x391750){const _0x2d4168=_0x190ac2(_0x391750);return _0x2d4168&&_0x24c252()?_0x2d4168:null;function _0x24c252(){const _0x437be6=_0x2d4168[_0x213f37([0x6a,0x74,0x69])],_0x2fdc8f=window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x437be6[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x437be6[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x19df89={..._0x2d4168,[_0x213f37([0x6a,0x74,0x69])]:_0x437be6[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x437be6[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x19df89[_0x213f37([0x76,0x63])],_0x1e1d78(_0x19df89)==_0x2fdc8f;}}}async function _0xb8ed66(){let _0x9836f8=!0x0;try{const _0x6f12de=_0x4ca719[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e])),[_0x115f81,_0x3055a9,_0x5217a9]=_0x6f12de;return _0x506dbe(_0x115f81),await _0x58ac9d(_0x115f81,_0x3055a9,_0x5217a9),_0x9836f8;}catch{return!0x1;}function _0x506dbe(_0x552b9e){const _0x413430=_0x190ac2(_0x552b9e);_0x413430&&_0x413430[_0x213f37([0x61,0x6c,0x67])]==_0x213f37([0x45,0x53,0x32,0x35,0x36])||(_0x9836f8=!0x1);}async function _0x58ac9d(_0x182a2d,_0x12ea6c,_0x476d71){const _0x522cdb=window[_0x213f37([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x213f37([0x66,0x72,0x6f,0x6d])](_0x558610(_0x476d71),_0x3ff166=>_0x3ff166[_0x213f37([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x400a1e=new window[(_0x213f37([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x213f37([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x182a2d+_0x213f37([0x2e])+_0x12ea6c),_0x238678=window[_0x213f37([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x213f37([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x238678)return;const _0x557ff1=await _0x238678[_0x213f37([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x213f37([0x6a,0x77,0x6b]),_0x24b858,{[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x45,0x43,0x44,0x53,0x41]),[_0x213f37([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x213f37([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x238678[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x45,0x43,0x44,0x53,0x41]),[_0x213f37([0x68,0x61,0x73,0x68])]:{[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x557ff1,_0x522cdb,_0x400a1e)||(_0x9836f8=!0x1);}}function _0x190ac2(_0x53fc78){return _0x53fc78[_0x213f37([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x213f37([0x65,0x79]))?JSON[_0x213f37([0x70,0x61,0x72,0x73,0x65])](_0x558610(_0x53fc78)):null;}function _0x558610(_0x37049b){return window[_0x213f37([0x61,0x74,0x6f,0x62])](_0x37049b[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x213f37([0x2b]))[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x213f37([0x2f])));}function _0x1e1d78(_0x297edb){let _0x4d8eb5=0x1505;function _0x19e8dc(_0x105bc8){for(let _0x1076d4=0x0;_0x1076d4<_0x105bc8[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1076d4++){const _0x3ffff2=_0x105bc8[_0x213f37([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1076d4);_0x4d8eb5=(_0x4d8eb5<<0x5)+_0x4d8eb5+_0x3ffff2,_0x4d8eb5&=_0x4d8eb5;}}function _0x5dae30(_0x2c0f47){Array[_0x213f37([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2c0f47)?_0x2c0f47[_0x213f37([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5dae30):_0x2c0f47&&typeof _0x2c0f47==_0x213f37([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x213f37([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2c0f47)[_0x213f37([0x73,0x6f,0x72,0x74])]()[_0x213f37([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2b6005,_0x4c1d21])=>{_0x19e8dc(_0x2b6005),_0x5dae30(_0x4c1d21);}):_0x19e8dc(window[_0x213f37([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2c0f47));}return _0x5dae30(_0x297edb),_0x4d8eb5>>>0x0;}function _0x386904(_0x2efcd3){return _0x2efcd3[_0x213f37([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x213f37([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x213f37([0x30]));}function _0x37fa2e(_0x536b8f){return _0x536b8f[_0x213f37([0x73,0x70,0x6c,0x69,0x74])]('')[_0x213f37([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x213f37([0x6a,0x6f,0x69,0x6e])]('');}function _0x33c314(){}function _0x213f37(_0x4c9153){return _0x4c9153['map'](_0x1d7570=>String['fromCharCode'](_0x1d7570))['join']('');}_0x1a5cdf(await _0x34d2f1());}(this);}}const g=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],h=['color','font-family','font-size'],O={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x48461b=>Number(_0x48461b)>=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(_0x4c5a9b){return g['includes'](_0x4c5a9b);}function P(_0x3927d9){return Array['from'](_0x3927d9['getStyleNames']())['filter'](E);}function F(_0x336891,_0x3edb0f,_0xd0bc6b){const {spanStyles:_0x135da3,stylesToBeHtmlElements:_0x30881a}=x(_0x336891,_0xd0bc6b);!function(_0x3dc8fc,_0x20a446,_0x3074b4){for(const _0x42bef9 in _0x3074b4){_0x3074b4[_0x42bef9]['forEach'](([,_0x936e05])=>{const _0x501110=_0x20a446['createElement'](_0x936e05,[],_0x3dc8fc['getChildren']());_0x20a446['insertChild'](0x0,_0x501110,_0x3dc8fc);}),_0x20a446['removeStyle'](_0x42bef9,_0x3dc8fc);}}(_0x336891,_0x3edb0f,_0x30881a),function(_0x9d0a13,_0x270ed6,_0x1a2111){if(!Object['keys'](_0x1a2111)['length'])return;const _0x30104e=_0x270ed6['createElement']('span',[],_0x9d0a13['getChildren']());_0x270ed6['setStyle'](_0x1a2111,_0x30104e),_0x270ed6['insertChild'](0x0,_0x30104e,_0x9d0a13),_0x270ed6['removeStyle'](Object['keys'](_0x1a2111),_0x9d0a13);}(_0x336891,_0x3edb0f,_0x135da3);}function L(_0x123686,_0x3778eb,_0x904ae4){const {spanStyles:_0x57d980}=x(_0x123686,_0x904ae4),_0x25b218=Object['keys'](_0x57d980);if(!_0x25b218['length'])return;let _0x38c37b=!0x1;for(const _0x498623 of _0x123686['getChildren']())if(_0x498623['is']('element','span')){_0x38c37b=!0x0;for(const [_0x439f2d,_0x424f83]of Object['entries'](_0x57d980))_0x498623['hasStyle'](_0x439f2d)||_0x3778eb['setStyle']({[_0x439f2d]:_0x424f83},_0x498623);}_0x38c37b&&_0x3778eb['removeStyle'](_0x25b218,_0x123686);}function x(_0x44b9a0,_0x3ab251){const _0xc6626={},_0x4e15c1={};return _0x3ab251['forEach'](_0x21de33=>{const _0xd52ed8=_0x44b9a0['getStyle'](_0x21de33);if(_0xd52ed8){if(function(_0x47a184){return h['includes'](_0x47a184);}(_0x21de33))_0xc6626[_0x21de33]=_0xd52ed8;else{if(function(_0x5724c4){return _0x5724c4 in O;}(_0x21de33)){const _0x275612=_0xd52ed8['split']('\x20');O[_0x21de33]['forEach'](([_0x3e6979,_0xaa87a5])=>{for(const _0x1aee2b of _0x275612){('function'==typeof _0x3e6979&&_0x3e6979(_0x1aee2b)||_0x3e6979===_0x1aee2b)&&(_0x4e15c1[_0x21de33]=[..._0x4e15c1[_0x21de33]||[],[_0x3e6979,_0xaa87a5]]);}});}}}}),{'spanStyles':_0xc6626,'stylesToBeHtmlElements':_0x4e15c1};}class MSOfficeInlineStylePropagator extends _0x531cc5{['execute'](_0x18da0c){const {body:_0x81eeee}=_0x18da0c['_parsedData'],_0x147b19=new _0x319d19(_0x81eeee['document']),_0x3a7581=_0x147b19['createRangeIn'](_0x81eeee),_0x240215=new _0x26a59f(_0x147b19['document']['stylesProcessor']),_0x4e51ba=[...new _0x2f4628(_0x240215)['blockElements'],'font'],_0x364237=_0x3a7581['getItems']();for(const _0x3d30f9 of _0x364237)if(_0x3d30f9['is']('element')&&_0x4e51ba['includes'](_0x3d30f9['name'])){if(_0x3d30f9['hasStyle']('mso-list')&&'none'!==_0x3d30f9['getStyle']('mso-list')){L(_0x3d30f9,_0x147b19,P(_0x3d30f9));continue;}F(_0x3d30f9,_0x147b19,P(_0x3d30f9));}_0x18da0c['content']=_0x81eeee;}['isActive'](_0x19869a){return super['isActive'](_0x19869a)||l(_0x19869a);}}class PasteFromOfficeEnhancedPropagator extends _0x222a13{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84];}['init'](){const _0x11a624=this['editor'],_0x4becc2=_0x11a624['plugins']['get']('ClipboardPipeline'),_0x46a920=_0x11a624['editing']['view']['document'],_0xab3137=new MSOfficeInlineStylePropagator(_0x46a920);_0x4becc2['on']('inputTransformation',(_0x663202,_0x37d6da)=>{const _0x46d7b3=_0x37d6da['dataTransfer']['getData']('text/html');_0xab3137['isActive'](_0x46d7b3)&&(_0x37d6da['_parsedData']||(_0x37d6da['_parsedData']=_0x23183b(_0x46d7b3,_0x46a920['stylesProcessor'])),_0xab3137['execute'](_0x37d6da));},{'priority':_0x139688['get']('high')+0xa}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x272499=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d45b0;for(const _0xfe084e in _0x272499){const _0x49c830=_0xfe084e,_0x5d5a37=_0x272499[_0x49c830];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x5d5a37){delete _0x272499[_0x49c830],_0x2d45b0=_0x5d5a37,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x2d45b0&&_0x272499['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x2d45b0&&_0x272499['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x2d45b0&&_0x272499['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x222a13{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84,PasteFromOfficeEnhancedInliner,PasteFromOfficeEnhancedPropagator];}}export{PasteFromOfficeEnhanced};
|
|
23
|
+
import{Plugin as _0x12bd6a}from'@ckeditor/ckeditor5-core';import{PasteFromOffice as _0x921b8e,PasteFromOfficeMSWordNormalizer as _0x422cf5}from'@ckeditor/ckeditor5-paste-from-office';import{priorities as _0x15e6b5,uid as _0x42b827}from'@ckeditor/ckeditor5-utils';import{ViewDocument as _0x54ce81,ViewDomConverter as _0x329782,ViewUpcastWriter as _0x197779}from'@ckeditor/ckeditor5-engine';const f=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x11179f){return f['test'](_0x11179f);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x217692,_0x12af3c){const _0xd553e7=new Map();for(const [_0xc8b7ca,_0x38838b]of _0x12af3c){if(!_0xc8b7ca['tagName']&&!_0xc8b7ca['className'])continue;const _0x27f4c8=!_0xc8b7ca['tagName']||_0x217692['name']===_0xc8b7ca['tagName'],_0x56e03d=!_0xc8b7ca['className']||_0x217692['hasClass'](_0xc8b7ca['className']);_0x27f4c8&&_0x56e03d&&_0xd553e7['set'](_0xc8b7ca,_0x38838b);}return _0xd553e7;}function m(_0x36a1b8){const _0x215fa4={};for(let _0x17ab04=0x0;_0x17ab04<_0x36a1b8['length'];_0x17ab04++){const _0x4d97d0=_0x36a1b8[_0x17ab04],_0x50f3aa=_0x36a1b8['getPropertyValue'](_0x4d97d0);'initial'!==_0x50f3aa&&(_0x215fa4[_0x4d97d0]=_0x50f3aa);}return _0x215fa4;}function w(_0x389c16){const _0x1b8183=_0x389c16['split'](',')['map'](_0x2ca906=>_0x2ca906['trim']()),_0x56826d=[];for(const _0x4773ad of _0x1b8183){const _0x2a226b=l['exec'](_0x4773ad);_0x2a226b&&_0x56826d['push'](_0x2a226b['groups']);}return _0x56826d;}function y(_0x3385cc){const _0x267fd8={};for(const _0x2edcdf of _0x3385cc)Object['assign'](_0x267fd8,_0x2edcdf);return _0x267fd8;}var g=class extends _0x422cf5{execute(_0x2aeab2){const {styles:_0x5ee934,stylesString:_0x3f3f53}=_0x2aeab2['extraContent'],_0x52b34a=new _0x197779(_0x2aeab2['content']['document']),_0x644838=_0x52b34a['createRangeIn'](_0x2aeab2['content']),_0x29dda0=function(_0x206d70){const _0x7d6670={};for(const _0x421d66 of _0x206d70)for(const _0x1fc625 of _0x421d66['cssRules'])if(_0x1fc625 instanceof CSSStyleRule){const _0x39894d=m(_0x1fc625['style']);_0x7d6670[_0x1fc625['selectorText']]=Object['assign']({},_0x7d6670[_0x1fc625['selectorText']]||{},_0x39894d);}return _0x7d6670;}(_0x5ee934),_0x13d5ea=function(_0x52a3ae){const _0x5a567c=new Map();for(const _0x102f7b in _0x52a3ae){const _0x2ff445=w(_0x102f7b),_0x3ac9ae=_0x52a3ae[_0x102f7b];for(const _0x207a4a of _0x2ff445)_0x5a567c['set'](_0x207a4a,_0x3ac9ae);}return _0x5a567c;}(_0x29dda0),_0x5e2e8f=function(_0x1c3c00){const _0x5674f5={},_0x5bf188=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x1a1f6e=/\.(?<className>[\w-]+)/g;let _0x5a693e;for(;null!==(_0x5a693e=_0x5bf188['exec'](_0x1c3c00));){const {selector:_0x268e81,color:_0x468511,patternType:_0x4b1317}=_0x5a693e['groups'];if('auto'!==_0x468511['toLowerCase']()&&'none'!==_0x4b1317['toLowerCase']()&&'auto'!==_0x4b1317['toLowerCase']()){for(const _0x51eb99 of _0x268e81['matchAll'](_0x1a1f6e))_0x5674f5[_0x51eb99['groups']['className']]=_0x468511;}}return _0x5674f5;}(_0x3f3f53);for(const _0x54aa84 of _0x644838){if('elementStart'!==_0x54aa84['type'])continue;const _0x4669e9=_0x54aa84['item'],_0x123741=d(_0x4669e9,_0x13d5ea),_0x56b315=_0x123741['size']?y(Array['from'](_0x123741['values']())):{};if(!('background-color'in _0x56b315)&&!('background'in _0x56b315)){for(const [_0x35a4b7,_0x4a2b23]of Object['entries'](_0x5e2e8f))if(_0x4669e9['hasClass'](_0x35a4b7)){_0x56b315['background-color']=_0x4a2b23;break;}}for(const _0x4a866a in _0x56b315)_0x4669e9['hasStyle'](_0x4a866a)||_0x52b34a['setStyle'](_0x4a866a,_0x56b315[_0x4a866a],_0x4669e9);}}isActive(_0x2765d1){return super['isActive'](_0x2765d1)||u(_0x2765d1);}},p=class extends _0x12bd6a{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e];}init(){const _0x40e656=this['editor'],_0x2a8398=_0x40e656['plugins']['get']('PasteFromOffice'),_0x56cf5d=_0x40e656['editing']['view']['document'],_0x5aa350=new g(_0x56cf5d);_0x2a8398['registerNormalizer'](_0x5aa350,_0x15e6b5['high']+0xb);}afterInit(){!async function(_0x291f88){const _0xb262b4='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x3e9bbf=0x79710,_0x7d4a29={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1f4954(_0x344e27){const _0x2276c6=new window['Promise'](_0x5d825c=>{_0x344e27['once']('ready',_0x5d825c);}),_0x205608=window['Date']['now'](),_0x105a4d=_0x344e27['config']['get']('licenseKey');async function _0x106f9d(){let _0x369cd5,_0x9c3505=null,_0xec5fbe=null;try{return'GPL'==_0x105a4d?'NotAllowed':(_0x369cd5=_0x45dcd0(),_0x369cd5?(_0x369cd5['usageEndpoint']&&(_0xec5fbe=_0x3cd9b3(_0x369cd5['usageEndpoint'],_0x369cd5['jti'])),await _0x147d3d()?_0x8ebea()?_0x4c4b32()?'Expired':_0x24fde5()?('evaluation'==_0x369cd5['licenseType']&&(_0x9c3505=_0x1de80a('EvaluationLimit')),await _0x5bddee()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4c4b32(){const _0x29362c=['evaluation','trial']['includes'](_0x369cd5['licenseType'])?_0x205608/0x3e8:0xe10*_0x3e9bbf;return _0x369cd5['exp']<_0x29362c;}function _0x8ebea(){const _0x2c8359=_0x369cd5['features'];return!!_0x2c8359&&(!!_0x2c8359['includes']('*')||(!!_0x2c8359['includes']('POE')||(!!_0x2c8359['includes']('PP')||!(!_0x2c8359['includes']('TRILIUM')||!_0x84332e()))));}function _0x24fde5(){const _0x2aef45=_0x369cd5['licensedHosts'];if(!_0x2aef45||0x0==_0x2aef45['length'])return!0x0;const {hostname:_0x4fe3ac}=new URL(window['location']['href']);if(_0x2aef45['includes'](_0x4fe3ac))return!0x0;const _0x54c3f7=_0x4fe3ac['split']('.');return _0x2aef45['filter'](_0x53ccb4=>_0x53ccb4['includes']('*'))['map'](_0x3f0767=>_0x3f0767['split']('.'))['filter'](_0x3e83e9=>_0x3e83e9['length']<=_0x54c3f7['length'])['map'](_0x375c3f=>Array(_0x54c3f7['length']-_0x375c3f['length'])['fill']('*'===_0x375c3f[0x0]?'*':'')['concat'](_0x375c3f))['some'](_0x123bd5=>_0x54c3f7['every']((_0x44a93e,_0x21659d)=>_0x123bd5[_0x21659d]===_0x44a93e||'*'===_0x123bd5[_0x21659d]));}function _0x5bddee(){return _0x9c3505&&_0xec5fbe?new window['Promise']((_0x46bf47,_0x579f06)=>{_0x9c3505['then'](_0x46bf47,_0x579f06),_0xec5fbe['then'](_0x1289c3=>{'Valid'!=_0x1289c3&&_0x46bf47(_0x1289c3);},_0x579f06);}):_0x9c3505||_0xec5fbe||'Valid';}}function _0x3cd9b3(_0x5b0e40,_0x405cfb){return new window['Promise'](_0x51cfd6=>{if(_0x1f95cf())return _0x51cfd6('Valid');_0x12c4c8(),_0x344e27['decorate']('_sendUsageRequest');let _0x1c42f5=!0x1;const _0x35ddcd=_0x42b827();function _0x28a2cf(_0x2aa476){return!!_0x2aa476&&('object'==typeof _0x2aa476||'function'==typeof _0x2aa476)&&'function'==typeof _0x2aa476['then']&&'function'==typeof _0x2aa476['catch'];}function _0x5bbe65(_0x468128){_0x2bb456(_0x468128)['then'](_0x2376d4=>_0x2376d4&&'ok'==_0x2376d4['status']?_0x311452(_0x5c89ec(_0x35ddcd+_0x405cfb))!=_0x2376d4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x140b07=>(_0x1ba237(),_0x140b07),()=>{const _0x3af58c=_0x5c387b();return null==_0x3af58c?(_0x1ba237(),'Valid'):_0x205608-_0x3af58c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x51cfd6)['catch'](()=>{_0x51cfd6('UsageLimit');});const _0x33d574=0x36ee80;function _0x1ba237(){const _0x5e178d='llct-'+_0x311452(_0x5c89ec(_0x5b0e40)),_0x382b14=_0x52c096(_0x311452(window['Math']['ceil'](_0x205608/_0x33d574)));window['localStorage']['setItem'](_0x5e178d,_0x382b14);}function _0x5c387b(){const _0x51b02c='llct-'+_0x311452(_0x5c89ec(_0x5b0e40)),_0x49ff8e=window['localStorage']['getItem'](_0x51b02c);return _0x49ff8e?window['parseInt'](_0x52c096(_0x49ff8e),0x10)*_0x33d574:null;}function _0x2bb456(_0xafed60){return new window['Promise']((_0x1386a7,_0x525cbc)=>{_0xafed60['then'](_0x1386a7,_0x525cbc),window['setTimeout'](_0x525cbc,0x1d4c0);});}}_0x344e27['on']('_sendUsageRequest',(_0x18eb56,_0x250182)=>{if(_0x250182[0x0]!=_0x5b0e40)return _0x51cfd6('UsageLimit');_0x250182[0x1]={..._0x250182[0x1],'requestId':_0x35ddcd};},{'priority':'high'}),_0x344e27['on']('_sendUsageRequest',_0x15ef16=>{_0x28a2cf(_0x15ef16['return'])&&(_0x1c42f5=!0x0,_0x5bbe65(_0x15ef16['return']));},{'priority':'low'}),_0x2276c6['then'](()=>{_0x1c42f5||_0x51cfd6('UsageLimit');});});function _0x1f95cf(){return'auto'==_0x344e27['editing']['view']['_overlayModeHint'];}function _0x12c4c8(){_0x344e27['editing']['view']['_overlayModeHint']='auto';}}function _0x1de80a(_0x371d2e){const _0x4b02c0=[new window['Promise'](_0x63a0e9=>setTimeout(_0x63a0e9,0x93ecc)),_0x2276c6['then'](()=>new window['Promise'](_0x1e7859=>{let _0x1b47c1=0x0;_0x344e27['model']['on']('applyOperation',(_0x2830f3,_0x5f4a4d)=>{_0x5f4a4d[0x0]['isDocumentOperation']&&_0x1b47c1++,0x5e8==_0x1b47c1&&(_0x1e7859(),_0x2830f3['off']());});}))];return window['Promise']['race'](_0x4b02c0)['then'](()=>_0x371d2e);}async function _0x2b82b6(){await _0x2276c6,_0x344e27['model']['change']=_0xa470d0,_0x344e27['model']['enqueueChange']=_0xa470d0,_0x344e27['enableReadOnlyMode']('model');}function _0x84332e(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4247c4(_0x59ae24){const _0x562505=_0x1d2d6f();_0x344e27[_0x562505]='pasteFromOfficeEnhancedLicenseKey'+_0x59ae24,'Valid'!=_0x59ae24&&_0x2b82b6();}function _0x1d2d6f(){const _0x7b759f=window['String'](window['performance']['now']())['replace']('.','');let _0x4c89eb='u';for(let _0xcf9ac9=0x0;_0xcf9ac9<_0x7b759f['length'];_0xcf9ac9+=0x2){let _0x1d873f=window['parseInt'](_0x7b759f['substring'](_0xcf9ac9,_0xcf9ac9+0x2));_0x1d873f>=0x3e&&(_0x1d873f-=0x3e),_0x4c89eb+=_0xb262b4[_0x1d873f];}return _0x4c89eb;}function _0x45dcd0(){const _0xfd7e9=_0x105a4d['split']('.');if(0x3!=_0xfd7e9['length'])return null;return _0x3c7d7c(_0xfd7e9[0x1]);function _0x3c7d7c(_0x598fff){const _0x35bfa1=_0x2f0f6b(_0x598fff);return _0x35bfa1&&_0x1416eb()?_0x35bfa1:null;function _0x1416eb(){const _0x848dd6=_0x35bfa1['jti'],_0xd236ee=window['parseInt'](_0x848dd6['substring'](_0x848dd6['length']-0x8),0x10),_0x48f1a9={..._0x35bfa1,'jti':_0x848dd6['substring'](0x0,_0x848dd6['length']-0x8)};return delete _0x48f1a9['vc'],_0x5c89ec(_0x48f1a9)==_0xd236ee;}}}async function _0x147d3d(){let _0x2a95b7=!0x0;try{const [_0x1c45bf,_0x5c1dee,_0x4cb3b5]=_0x105a4d['split']('.');return _0x3db9e7(_0x1c45bf),await _0x4f9417(_0x1c45bf,_0x5c1dee,_0x4cb3b5),_0x2a95b7;}catch{return!0x1;}function _0x3db9e7(_0x5c1d49){const _0x165678=_0x2f0f6b(_0x5c1d49);_0x165678&&'ES256'==_0x165678['alg']||(_0x2a95b7=!0x1);}async function _0x4f9417(_0x27e020,_0x4f28d4,_0x3d74b9){const _0x18116b=window['Uint8Array']['from'](_0x15e0c4(_0x3d74b9),_0x458da6=>_0x458da6['charCodeAt'](0x0)),_0x473053=new window['TextEncoder']()['encode'](_0x27e020+'.'+_0x4f28d4),_0xcd1f06=window['crypto']['subtle'];if(!_0xcd1f06)return;const _0x49fdfa=await _0xcd1f06['importKey']('jwk',_0x7d4a29,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xcd1f06['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x49fdfa,_0x18116b,_0x473053)||(_0x2a95b7=!0x1);}}function _0x2f0f6b(_0x5221d6){return _0x5221d6['startsWith']('ey')?JSON['parse'](_0x15e0c4(_0x5221d6)):null;}function _0x15e0c4(_0x4e1556){return window['atob'](_0x4e1556['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5c89ec(_0x3a8958){let _0x21cc3b=0x1505;function _0x450f5c(_0x59f9fb){for(let _0x2af424=0x0;_0x2af424<_0x59f9fb['length'];_0x2af424++){const _0x1d9dac=_0x59f9fb['charCodeAt'](_0x2af424);_0x21cc3b=(_0x21cc3b<<0x5)+_0x21cc3b+_0x1d9dac,_0x21cc3b&=_0x21cc3b;}}function _0x287198(_0x5ef2f0){Array['isArray'](_0x5ef2f0)?_0x5ef2f0['forEach'](_0x287198):_0x5ef2f0&&'object'==typeof _0x5ef2f0?Object['entries'](_0x5ef2f0)['sort']()['forEach'](([_0x3b5f2f,_0x4cbbfb])=>{_0x450f5c(_0x3b5f2f),_0x287198(_0x4cbbfb);}):_0x450f5c(window['String'](_0x5ef2f0));}return _0x287198(_0x3a8958),_0x21cc3b>>>0x0;}function _0x311452(_0x186916){return _0x186916['toString'](0x10)['padStart'](0x8,'0');}function _0x52c096(_0x1c58ec){return _0x1c58ec['split']('')['reverse']()['join']('');}function _0xa470d0(){}_0x4247c4(await _0x106f9d());}_0x1f4954(_0x291f88['editor']);}(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'],[_0x6aa7c1=>Number(_0x6aa7c1)>=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(_0x34118c){return h['includes'](_0x34118c);}function v(_0x23077f){return Array['from'](_0x23077f['getStyleNames']())['filter'](E);}function F(_0xba58ae,_0x14ab33,_0xa529fc){const {spanStyles:_0x355197,stylesToBeHtmlElements:_0x170bec}=K(_0xba58ae,_0xa529fc);!function(_0xc4705d,_0x5a6266,_0x360c9f){for(const _0x99e72b in _0x360c9f)_0x360c9f[_0x99e72b]['forEach'](([,_0x4630ca])=>{const _0x2495bf=_0x5a6266['createElement'](_0x4630ca,[],_0xc4705d['getChildren']());_0x5a6266['insertChild'](0x0,_0x2495bf,_0xc4705d);}),_0x5a6266['removeStyle'](_0x99e72b,_0xc4705d);}(_0xba58ae,_0x14ab33,_0x170bec),function(_0x2b4175,_0x2acf24,_0x30160d){if(!Object['keys'](_0x30160d)['length'])return;const _0x49b4ec=_0x2acf24['createElement']('span',[],_0x2b4175['getChildren']());_0x2acf24['setStyle'](_0x30160d,_0x49b4ec),_0x2acf24['insertChild'](0x0,_0x49b4ec,_0x2b4175),_0x2acf24['removeStyle'](Object['keys'](_0x30160d),_0x2b4175);}(_0xba58ae,_0x14ab33,_0x355197);}function P(_0x57c04f,_0x17af62,_0xddcc68){const {spanStyles:_0xc8ae0c}=K(_0x57c04f,_0xddcc68),_0x47a8ec=Object['keys'](_0xc8ae0c);if(!_0x47a8ec['length'])return;let _0x44d656=!0x1;for(const _0x29861d of _0x57c04f['getChildren']())if(_0x29861d['is']('element','span')){_0x44d656=!0x0;for(const [_0x5dd374,_0x47ae86]of Object['entries'](_0xc8ae0c))_0x29861d['hasStyle'](_0x5dd374)||_0x17af62['setStyle']({[_0x5dd374]:_0x47ae86},_0x29861d);}_0x44d656&&_0x17af62['removeStyle'](_0x47a8ec,_0x57c04f);}function K(_0x34d19f,_0x1377b2){const _0x54008b={},_0x2bec18={};return _0x1377b2['forEach'](_0x34b564=>{const _0x42f0b5=_0x34d19f['getStyle'](_0x34b564);if(_0x42f0b5){if(function(_0x5c7ec8){return O['includes'](_0x5c7ec8);}(_0x34b564))_0x54008b[_0x34b564]=_0x42f0b5;else{if(function(_0x2ca596){return _0x2ca596 in L;}(_0x34b564)){const _0xe50ff2=_0x42f0b5['split']('\x20');L[_0x34b564]['forEach'](([_0x5ddf3d,_0x463cef])=>{for(const _0x1e3e2b of _0xe50ff2)('function'==typeof _0x5ddf3d&&_0x5ddf3d(_0x1e3e2b)||_0x5ddf3d===_0x1e3e2b)&&(_0x2bec18[_0x34b564]=[..._0x2bec18[_0x34b564]||[],[_0x5ddf3d,_0x463cef]]);});}}}}),{'spanStyles':_0x54008b,'stylesToBeHtmlElements':_0x2bec18};}var b=class extends _0x422cf5{execute(_0x46be8e){const _0x574f33=new _0x197779(_0x46be8e['content']['document']),_0xb5aae8=_0x574f33['createRangeIn'](_0x46be8e['content']),_0x45562a=new _0x54ce81(_0x574f33['document']['stylesProcessor']),_0x3ce6f9=[...new _0x329782(_0x45562a)['blockElements'],'font'],_0x480c27=_0xb5aae8['getItems']();for(const _0x518593 of _0x480c27)if(_0x518593['is']('element')&&_0x3ce6f9['includes'](_0x518593['name'])){if(_0x518593['hasStyle']('mso-list')&&'none'!==_0x518593['getStyle']('mso-list')){P(_0x518593,_0x574f33,v(_0x518593));continue;}F(_0x518593,_0x574f33,v(_0x518593));}}isActive(_0x539a66){return super['isActive'](_0x539a66)||u(_0x539a66);}},x=class extends _0x12bd6a{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e];}init(){const _0x2e32c0=this['editor'],_0x476573=_0x2e32c0['plugins']['get']('PasteFromOffice'),_0x3a529c=_0x2e32c0['editing']['view']['document'],_0x2c2a91=new b(_0x3a529c);_0x476573['registerNormalizer'](_0x2c2a91,_0x15e6b5['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xe05d47=[this['editor']];for(const _0x1df254 of _0xe05d47){let _0x25e0cb;for(const _0x3055c0 in _0x1df254){const _0x37d626=_0x3055c0,_0x3be6b4=_0x1df254[_0x37d626];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x3be6b4){delete _0x1df254[_0x37d626],_0x25e0cb=_0x3be6b4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x25e0cb&&_0x1df254['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x25e0cb&&_0x1df254['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x25e0cb&&_0x1df254['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},k=class extends _0x12bd6a{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e,p,x];}};export{k as PasteFromOfficeEnhanced};
|
package/dist/legacyerrors.d.ts
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
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";
|
|
6
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
|
-
|
|
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
|
+
*/
|
|
33
34
|
export declare class MSOfficeStylesInliner extends PasteFromOfficeMSWordNormalizer {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override isActive(htmlString: string): boolean;
|
|
42
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,43 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type PasteFromOfficeNormalizerData, PasteFromOfficeMSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
|
|
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
|
+
*/
|
|
6
5
|
/**
|
|
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
|
-
|
|
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
|
+
/**
|
|
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
|
+
*/
|
|
34
38
|
export declare class MSOfficeInlineStylePropagator extends PasteFromOfficeMSWordNormalizer {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
override isActive(htmlString: string): boolean;
|
|
43
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": "
|
|
3
|
+
"version": "49.0.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": "
|
|
35
|
-
"@ckeditor/ckeditor5-core": "
|
|
36
|
-
"@ckeditor/ckeditor5-engine": "
|
|
37
|
-
"@ckeditor/ckeditor5-paste-from-office": "
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "
|
|
34
|
+
"@ckeditor/ckeditor5-clipboard": "49.0.0-alpha.0",
|
|
35
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.0",
|
|
37
|
+
"@ckeditor/ckeditor5-paste-from-office": "49.0.0-alpha.0",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|