@ckeditor/ckeditor5-paste-from-office-enhanced 48.2.0 → 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 _0x564ade}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x352fbb,PasteFromOffice as _0x3ae215}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x4cdd7d,uid as _0x5ab7b8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x2528d8,ViewDocument as _0x5a0b83,ViewDomConverter as _0xb19473}from'@ckeditor/ckeditor5-engine/dist/index.js';const a=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x7030b){return a['test'](_0x7030b);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x23a8bd,_0x3e0b93){const _0x3c983e=new Map();for(const [_0x1137f9,_0x52e7c1]of _0x3e0b93){if(!_0x1137f9['tagName']&&!_0x1137f9['className'])continue;const _0x1f68d2=!_0x1137f9['tagName']||_0x23a8bd['name']===_0x1137f9['tagName'],_0x77f357=!_0x1137f9['className']||_0x23a8bd['hasClass'](_0x1137f9['className']);_0x1f68d2&&_0x77f357&&_0x3c983e['set'](_0x1137f9,_0x52e7c1);}return _0x3c983e;}function w(_0x503aab){const _0x5207ea={};for(let _0x2dd4af=0x0;_0x2dd4af<_0x503aab['length'];_0x2dd4af++){const _0x2e31af=_0x503aab[_0x2dd4af],_0x19cbcd=_0x503aab['getPropertyValue'](_0x2e31af);'initial'!==_0x19cbcd&&(_0x5207ea[_0x2e31af]=_0x19cbcd);}return _0x5207ea;}function m(_0x5e016a){const _0x5c624e=_0x5e016a['split'](',')['map'](_0x430158=>_0x430158['trim']()),_0x37fcbf=[];for(const _0x505592 of _0x5c624e){const _0x52ac93=l['exec'](_0x505592);_0x52ac93&&_0x37fcbf['push'](_0x52ac93['groups']);}return _0x37fcbf;}function p(_0x915907){const _0x9c0f1a={};for(const _0x580d8e of _0x915907)Object['assign'](_0x9c0f1a,_0x580d8e);return _0x9c0f1a;}class MSOfficeStylesInliner extends _0x352fbb{['execute'](_0x2e842a){const {styles:_0x521e97,stylesString:_0x4f0788}=_0x2e842a['extraContent'],_0x46dc38=new _0x2528d8(_0x2e842a['content']['document']),_0x53d3ce=_0x46dc38['createRangeIn'](_0x2e842a['content']),_0x152080=function(_0x1b0943){const _0x3f15a6={};for(const _0x300956 of _0x1b0943)for(const _0x81c382 of _0x300956['cssRules'])if(_0x81c382 instanceof CSSStyleRule){const _0x1506d7=w(_0x81c382['style']);_0x3f15a6[_0x81c382['selectorText']]=Object['assign']({},_0x3f15a6[_0x81c382['selectorText']]||{},_0x1506d7);}return _0x3f15a6;}(_0x521e97),_0x17f880=function(_0x40741c){const _0xf41f78=new Map();for(const _0x1c58af in _0x40741c){const _0x17384b=m(_0x1c58af),_0x10d0d1=_0x40741c[_0x1c58af];for(const _0x8c0ca3 of _0x17384b)_0xf41f78['set'](_0x8c0ca3,_0x10d0d1);}return _0xf41f78;}(_0x152080),_0x4b0c53=function(_0x276d10){const _0x59d74b={},_0xae444=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x126bc4=/\.(?<className>[\w-]+)/g;let _0x1bc716;for(;null!==(_0x1bc716=_0xae444['exec'](_0x276d10));){const {selector:_0x4d5523,color:_0x4d52e8,patternType:_0x2b538f}=_0x1bc716['groups'];if('auto'!==_0x4d52e8['toLowerCase']()&&'none'!==_0x2b538f['toLowerCase']()&&'auto'!==_0x2b538f['toLowerCase']()){for(const _0x1e4d65 of _0x4d5523['matchAll'](_0x126bc4))_0x59d74b[_0x1e4d65['groups']['className']]=_0x4d52e8;}}return _0x59d74b;}(_0x4f0788);for(const _0x29fed8 of _0x53d3ce){if('elementStart'!==_0x29fed8['type'])continue;const _0x26809c=_0x29fed8['item'],_0x426533=d(_0x26809c,_0x17f880),_0x48241e=_0x426533['size']?p(Array['from'](_0x426533['values']())):{};if(!('background-color'in _0x48241e)&&!('background'in _0x48241e)){for(const [_0x302846,_0xf31c02]of Object['entries'](_0x4b0c53))if(_0x26809c['hasClass'](_0x302846)){_0x48241e['background-color']=_0xf31c02;break;}}for(const _0x442ae2 in _0x48241e)_0x26809c['hasStyle'](_0x442ae2)||_0x46dc38['setStyle'](_0x442ae2,_0x48241e[_0x442ae2],_0x26809c);}}['isActive'](_0x6f9737){return super['isActive'](_0x6f9737)||u(_0x6f9737);}}class PasteFromOfficeEnhancedInliner extends _0x564ade{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215];}['init'](){const _0x117924=this['editor'],_0x37af9a=_0x117924['plugins']['get']('PasteFromOffice'),_0x18e649=_0x117924['editing']['view']['document'],_0x104f28=new MSOfficeStylesInliner(_0x18e649);_0x37af9a['registerNormalizer'](_0x104f28,_0x4cdd7d['high']+0xb);}['afterInit'](){!async function(_0x4f38b2){const _0x537cb1=_0x47cb00([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]),_0x520aca=0x7374585f,_0x18e184=0x7373d38f^_0x520aca,_0x305715=window[_0x47cb00([0x44,0x61,0x74,0x65])][_0x47cb00([0x6e,0x6f,0x77])](),_0x23636f=_0x4f38b2[_0x47cb00([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3bb10f=new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e969c=>{_0x23636f[_0x47cb00([0x6f,0x6e,0x63,0x65])](_0x47cb00([0x72,0x65,0x61,0x64,0x79]),_0x5e969c);}),_0x50fed0={[_0x47cb00([0x6b,0x74,0x79])]:_0x47cb00([0x45,0x43]),[_0x47cb00([0x75,0x73,0x65])]:_0x47cb00([0x73,0x69,0x67]),[_0x47cb00([0x63,0x72,0x76])]:_0x47cb00([0x50,0x2d,0x32,0x35,0x36]),[_0x47cb00([0x78])]:_0x47cb00([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]),[_0x47cb00([0x79])]:_0x47cb00([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]),[_0x47cb00([0x61,0x6c,0x67])]:_0x47cb00([0x45,0x53,0x32,0x35,0x36])},_0x1629b0=_0x23636f[_0x47cb00([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47cb00([0x67,0x65,0x74])](_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52eb9b(){let _0x4f4459,_0x47a163=null,_0x749b01=null;try{if(_0x1629b0==_0x47cb00([0x47,0x50,0x4c]))return _0x47cb00([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f4459=_0x153945(),!_0x4f4459)return _0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f4459[_0x47cb00([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x749b01=_0x2f9c91(_0x4f4459[_0x47cb00([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f4459[_0x47cb00([0x6a,0x74,0x69])])),await _0x745636()?_0x539df5()?_0x5d594e()?_0x47cb00([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19fec0()?(_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47cb00([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47a163=_0x4d78c9(_0x47cb00([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1289e6()):_0x47cb00([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47cb00([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5d594e(){const _0x5a23fa=[_0x47cb00([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47cb00([0x74,0x72,0x69,0x61,0x6c])][_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x305715/0x3e8:0xe10*_0x18e184;return _0x4f4459[_0x47cb00([0x65,0x78,0x70])]<_0x5a23fa;}function _0x539df5(){const _0x2cabf7=_0x4f4459[_0x47cb00([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2cabf7&&(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x2a]))||(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x50,0x4f,0x45]))||(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x50,0x50]))||!(!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0x160901()))));}function _0x19fec0(){const _0x29ba1b=_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29ba1b||0x0==_0x29ba1b[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3e10d8}=new URL(window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29ba1b[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e10d8))return!0x0;const _0x274231=_0x3e10d8[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e]));return _0x29ba1b[_0x47cb00([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x27135b=>_0x27135b[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x2a])))[_0x47cb00([0x6d,0x61,0x70])](_0x1b7222=>_0x1b7222[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e])))[_0x47cb00([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf2d031=>_0xf2d031[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x274231[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47cb00([0x6d,0x61,0x70])](_0x1208a1=>Array(_0x274231[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1208a1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47cb00([0x66,0x69,0x6c,0x6c])](_0x1208a1[0x0]===_0x47cb00([0x2a])?_0x47cb00([0x2a]):'')[_0x47cb00([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1208a1))[_0x47cb00([0x73,0x6f,0x6d,0x65])](_0x5301c5=>_0x274231[_0x47cb00([0x65,0x76,0x65,0x72,0x79])]((_0x40a703,_0x4a3200)=>_0x5301c5[_0x4a3200]===_0x40a703||_0x5301c5[_0x4a3200]===_0x47cb00([0x2a])));}function _0x1289e6(){return _0x47a163&&_0x749b01?new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4cfeff,_0x440ee6)=>{_0x47a163[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x4cfeff,_0x440ee6),_0x749b01[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x48ac07=>{_0x48ac07!=_0x47cb00([0x56,0x61,0x6c,0x69,0x64])&&_0x4cfeff(_0x48ac07);},_0x440ee6);}):_0x47a163||_0x749b01||_0x47cb00([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f9c91(_0x2d7eec,_0x2593a5){return new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x462a61=>{if(_0x2cdef5())return _0x462a61(_0x47cb00([0x56,0x61,0x6c,0x69,0x64]));_0x53e039(),_0x23636f[_0x47cb00([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230d1c=!0x1;const _0x30ef34=_0x5ab7b8();function _0x4908e1(_0x13ac0f){return!!_0x13ac0f&&(typeof _0x13ac0f===_0x47cb00([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x13ac0f===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x13ac0f[_0x47cb00([0x74,0x68,0x65,0x6e])]===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x13ac0f[_0x47cb00([0x63,0x61,0x74,0x63,0x68])]===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x449fd3(_0x5c35f2){_0x5e9982(_0x5c35f2)[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x2a66cc=>{if(!_0x2a66cc||_0x2a66cc[_0x47cb00([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47cb00([0x6f,0x6b]))return _0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3dbaa9(_0xb553c5(_0x30ef34+_0x2593a5))!=_0x2a66cc[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47cb00([0x56,0x61,0x6c,0x69,0x64]);})[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x4c5b7e=>(_0x482354(),_0x4c5b7e),()=>{const _0x2edf26=_0x58b570();return null==_0x2edf26?(_0x482354(),_0x47cb00([0x56,0x61,0x6c,0x69,0x64])):_0x47cb00(_0x305715-_0x2edf26>(0x5778dc5f^_0x520aca)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x462a61)[_0x47cb00([0x63,0x61,0x74,0x63,0x68])](()=>{_0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x13bac5=0x7342b6df^_0x520aca;function _0x482354(){const _0x3ebd70=_0x47cb00([0x6c,0x6c,0x63,0x74,0x2d])+_0x3dbaa9(_0xb553c5(_0x2d7eec)),_0x5d872c=_0x3f5542(_0x3dbaa9(window[_0x47cb00([0x4d,0x61,0x74,0x68])][_0x47cb00([0x63,0x65,0x69,0x6c])](_0x305715/_0x13bac5)));window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47cb00([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ebd70,_0x5d872c);}function _0x58b570(){const _0x39d8aa=_0x47cb00([0x6c,0x6c,0x63,0x74,0x2d])+_0x3dbaa9(_0xb553c5(_0x2d7eec)),_0x5091f4=window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47cb00([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x39d8aa);return _0x5091f4?window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f5542(_0x5091f4),0x10)*_0x13bac5:null;}function _0x5e9982(_0x1babcc){return new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3334fa,_0x2ada25)=>{_0x1babcc[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x3334fa,_0x2ada25),window[_0x47cb00([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2ada25,0x73758c9f^_0x520aca);});}}_0x23636f[_0x47cb00([0x6f,0x6e])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b0763,_0x5f56f9)=>{if(_0x5f56f9[0x0]!=_0x2d7eec)return _0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5f56f9[0x1]={..._0x5f56f9[0x1],[_0x47cb00([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30ef34};},{[_0x47cb00([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47cb00([0x68,0x69,0x67,0x68])}),_0x23636f[_0x47cb00([0x6f,0x6e])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4a2c8a=>{_0x4908e1(_0x4a2c8a[_0x47cb00([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230d1c=!0x0,_0x449fd3(_0x4a2c8a[_0x47cb00([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47cb00([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47cb00([0x6c,0x6f,0x77])}),_0x3bb10f[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>{_0x230d1c||_0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cdef5(){return _0x23636f[_0x47cb00([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47cb00([0x76,0x69,0x65,0x77])][_0x47cb00([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47cb00([0x61,0x75,0x74,0x6f]);}function _0x53e039(){_0x23636f[_0x47cb00([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47cb00([0x76,0x69,0x65,0x77])][_0x47cb00([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47cb00([0x61,0x75,0x74,0x6f]);}}function _0x4d78c9(_0x3655b7){const _0x282f1e=[new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f32d1=>setTimeout(_0x2f32d1,0x737d6693^_0x520aca)),_0x3bb10f[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b6c66=>{let _0x15b7f4=0x0;_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x6f,0x6e])](_0x47cb00([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1ed9d5,_0x24685b)=>{_0x24685b[0x0][_0x47cb00([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x15b7f4++,_0x15b7f4==(0x73745db7^_0x520aca)&&(_0x3b6c66(),_0x1ed9d5[_0x47cb00([0x6f,0x66,0x66])]());});}))];return window[_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47cb00([0x72,0x61,0x63,0x65])](_0x282f1e)[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>_0x3655b7);}async function _0x1f7fe6(){await _0x3bb10f,_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x252d69,_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x252d69,_0x23636f[_0x47cb00([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x160901(){return window[_0x47cb00([0x67,0x6c,0x6f,0x62])]&&window[_0x47cb00([0x67,0x6c,0x6f,0x62])][_0x47cb00([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x5b3dee(_0x76cca5){const _0x1fa77e=_0x8d1ad0();_0x23636f[_0x1fa77e]=_0x47cb00([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])+_0x76cca5,_0x76cca5!=_0x47cb00([0x56,0x61,0x6c,0x69,0x64])&&_0x1f7fe6();}function _0x8d1ad0(){const _0x25c7a6=window[_0x47cb00([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47cb00([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47cb00([0x6e,0x6f,0x77])]())[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47cb00([0x2e]),'');let _0xb9d65f=_0x47cb00([0x73]);for(let _0x53e085=0x0;_0x53e085<_0x25c7a6[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53e085+=0x2){let _0x4c6582=window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25c7a6[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53e085,_0x53e085+0x2));_0x4c6582>=_0x537cb1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4c6582-=_0x537cb1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb9d65f+=_0x537cb1[_0x4c6582];}return _0xb9d65f;}function _0x153945(){const _0x1d2284=_0x1629b0[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e]));if(0x3!=_0x1d2284[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf3f164(_0x1d2284[0x1]);function _0xf3f164(_0x122dd1){const _0x2c23d0=_0x310055(_0x122dd1);return _0x2c23d0&&_0x3b39b6()?_0x2c23d0:null;function _0x3b39b6(){const _0x217102=_0x2c23d0[_0x47cb00([0x6a,0x74,0x69])],_0xbfab8b=window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x217102[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x217102[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3fbd30={..._0x2c23d0,[_0x47cb00([0x6a,0x74,0x69])]:_0x217102[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x217102[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3fbd30[_0x47cb00([0x76,0x63])],_0xb553c5(_0x3fbd30)==_0xbfab8b;}}}async function _0x745636(){let _0x5dbcc8=!0x0;try{const _0x438f77=_0x1629b0[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e])),[_0x2f1097,_0x44ee83,_0x2e9daf]=_0x438f77;return _0x28c3f4(_0x2f1097),await _0x5afed9(_0x2f1097,_0x44ee83,_0x2e9daf),_0x5dbcc8;}catch{return!0x1;}function _0x28c3f4(_0x53f14e){const _0xbdcc09=_0x310055(_0x53f14e);_0xbdcc09&&_0xbdcc09[_0x47cb00([0x61,0x6c,0x67])]==_0x47cb00([0x45,0x53,0x32,0x35,0x36])||(_0x5dbcc8=!0x1);}async function _0x5afed9(_0xd8dbbd,_0x77aec4,_0x253966){const _0x53b6c6=window[_0x47cb00([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47cb00([0x66,0x72,0x6f,0x6d])](_0x41977e(_0x253966),_0x2e9534=>_0x2e9534[_0x47cb00([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d8922=new window[(_0x47cb00([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47cb00([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xd8dbbd+_0x47cb00([0x2e])+_0x77aec4),_0xb67fc7=window[_0x47cb00([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47cb00([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb67fc7)return;const _0x29548e=await _0xb67fc7[_0x47cb00([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47cb00([0x6a,0x77,0x6b]),_0x50fed0,{[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x45,0x43,0x44,0x53,0x41]),[_0x47cb00([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47cb00([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb67fc7[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x45,0x43,0x44,0x53,0x41]),[_0x47cb00([0x68,0x61,0x73,0x68])]:{[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29548e,_0x53b6c6,_0x4d8922)||(_0x5dbcc8=!0x1);}}function _0x310055(_0x4df010){return _0x4df010[_0x47cb00([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47cb00([0x65,0x79]))?JSON[_0x47cb00([0x70,0x61,0x72,0x73,0x65])](_0x41977e(_0x4df010)):null;}function _0x41977e(_0x485d04){return window[_0x47cb00([0x61,0x74,0x6f,0x62])](_0x485d04[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47cb00([0x2b]))[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47cb00([0x2f])));}function _0xb553c5(_0x3ed337){let _0x48abca=0x1505;function _0x1f4e38(_0x545fb2){for(let _0x30a15b=0x0;_0x30a15b<_0x545fb2[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x30a15b++){const _0x3e9fa2=_0x545fb2[_0x47cb00([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x30a15b);_0x48abca=(_0x48abca<<0x5)+_0x48abca+_0x3e9fa2,_0x48abca&=_0x48abca;}}function _0x4ecaff(_0x8381f9){Array[_0x47cb00([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x8381f9)?_0x8381f9[_0x47cb00([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4ecaff):_0x8381f9&&typeof _0x8381f9==_0x47cb00([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47cb00([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x8381f9)[_0x47cb00([0x73,0x6f,0x72,0x74])]()[_0x47cb00([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5f0ae9,_0x6177a4])=>{_0x1f4e38(_0x5f0ae9),_0x4ecaff(_0x6177a4);}):_0x1f4e38(window[_0x47cb00([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x8381f9));}return _0x4ecaff(_0x3ed337),_0x48abca>>>0x0;}function _0x3dbaa9(_0x15806b){return _0x15806b[_0x47cb00([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47cb00([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47cb00([0x30]));}function _0x3f5542(_0x1b7322){return _0x1b7322[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47cb00([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47cb00([0x6a,0x6f,0x69,0x6e])]('');}function _0x252d69(){}function _0x47cb00(_0x554134){return _0x554134['map'](_0x12552b=>String['fromCharCode'](_0x12552b))['join']('');}_0x5b3dee(await _0x52eb9b());}(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'],[_0x3e0e62=>Number(_0x3e0e62)>=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(_0x5e5e79){return y['includes'](_0x5e5e79);}function E(_0x4e4087){return Array['from'](_0x4e4087['getStyleNames']())['filter'](O);}function F(_0x34dcff,_0x17c9c8,_0x3a38f5){const {spanStyles:_0x26f061,stylesToBeHtmlElements:_0x12283f}=L(_0x34dcff,_0x3a38f5);!function(_0x265913,_0x7cc8b,_0x411f22){for(const _0x274e88 in _0x411f22){_0x411f22[_0x274e88]['forEach'](([,_0x4f98be])=>{const _0x5458bd=_0x7cc8b['createElement'](_0x4f98be,[],_0x265913['getChildren']());_0x7cc8b['insertChild'](0x0,_0x5458bd,_0x265913);}),_0x7cc8b['removeStyle'](_0x274e88,_0x265913);}}(_0x34dcff,_0x17c9c8,_0x12283f),function(_0x3b1623,_0x1760f5,_0x4eda3d){if(!Object['keys'](_0x4eda3d)['length'])return;const _0x41a550=_0x1760f5['createElement']('span',[],_0x3b1623['getChildren']());_0x1760f5['setStyle'](_0x4eda3d,_0x41a550),_0x1760f5['insertChild'](0x0,_0x41a550,_0x3b1623),_0x1760f5['removeStyle'](Object['keys'](_0x4eda3d),_0x3b1623);}(_0x34dcff,_0x17c9c8,_0x26f061);}function P(_0x3e75a7,_0x5ee093,_0x8df850){const {spanStyles:_0x4cb048}=L(_0x3e75a7,_0x8df850),_0x1f7305=Object['keys'](_0x4cb048);if(!_0x1f7305['length'])return;let _0x2a2af5=!0x1;for(const _0x1418ba of _0x3e75a7['getChildren']())if(_0x1418ba['is']('element','span')){_0x2a2af5=!0x0;for(const [_0x30db78,_0x640547]of Object['entries'](_0x4cb048))_0x1418ba['hasStyle'](_0x30db78)||_0x5ee093['setStyle']({[_0x30db78]:_0x640547},_0x1418ba);}_0x2a2af5&&_0x5ee093['removeStyle'](_0x1f7305,_0x3e75a7);}function L(_0x4a87fa,_0x458226){const _0x4a2fc0={},_0x2652d9={};return _0x458226['forEach'](_0x5b8fff=>{const _0x4af2eb=_0x4a87fa['getStyle'](_0x5b8fff);if(_0x4af2eb){if(function(_0x2d70a4){return g['includes'](_0x2d70a4);}(_0x5b8fff))_0x4a2fc0[_0x5b8fff]=_0x4af2eb;else{if(function(_0x7b5dd7){return _0x7b5dd7 in h;}(_0x5b8fff)){const _0x1ae9cb=_0x4af2eb['split']('\x20');h[_0x5b8fff]['forEach'](([_0x289499,_0x27546a])=>{for(const _0x724c9a of _0x1ae9cb){('function'==typeof _0x289499&&_0x289499(_0x724c9a)||_0x289499===_0x724c9a)&&(_0x2652d9[_0x5b8fff]=[..._0x2652d9[_0x5b8fff]||[],[_0x289499,_0x27546a]]);}});}}}}),{'spanStyles':_0x4a2fc0,'stylesToBeHtmlElements':_0x2652d9};}class MSOfficeInlineStylePropagator extends _0x352fbb{['execute'](_0x13504a){const _0x42e16c=new _0x2528d8(_0x13504a['content']['document']),_0x20ec79=_0x42e16c['createRangeIn'](_0x13504a['content']),_0x76e421=new _0x5a0b83(_0x42e16c['document']['stylesProcessor']),_0x3c9407=[...new _0xb19473(_0x76e421)['blockElements'],'font'],_0xf281da=_0x20ec79['getItems']();for(const _0x43a775 of _0xf281da)if(_0x43a775['is']('element')&&_0x3c9407['includes'](_0x43a775['name'])){if(_0x43a775['hasStyle']('mso-list')&&'none'!==_0x43a775['getStyle']('mso-list')){P(_0x43a775,_0x42e16c,E(_0x43a775));continue;}F(_0x43a775,_0x42e16c,E(_0x43a775));}}['isActive'](_0x8e7fed){return super['isActive'](_0x8e7fed)||u(_0x8e7fed);}}class PasteFromOfficeEnhancedPropagator extends _0x564ade{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215];}['init'](){const _0x5cd1d6=this['editor'],_0x1f01a0=_0x5cd1d6['plugins']['get']('PasteFromOffice'),_0x1c692a=_0x5cd1d6['editing']['view']['document'],_0x71db94=new MSOfficeInlineStylePropagator(_0x1c692a);_0x1f01a0['registerNormalizer'](_0x71db94,_0x4cdd7d['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x492595=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x537e88;for(const _0x2b4067 in _0x492595){const _0x2bf7ea=_0x2b4067,_0x4845d1=_0x492595[_0x2bf7ea];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x4845d1){delete _0x492595[_0x2bf7ea],_0x537e88=_0x4845d1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x537e88&&_0x492595['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x537e88&&_0x492595['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x537e88&&_0x492595['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x537e88&&_0x492595['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x537e88&&_0x492595['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x537e88&&_0x492595['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x564ade{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215,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",
|