@ckeditor/ckeditor5-track-changes 31.1.0 → 34.0.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/LICENSE.md +2 -2
- package/README.md +5 -2
- package/build/track-changes.js +5 -0
- package/build/translations/az.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +3 -0
- package/lang/contexts.json +1 -1
- package/lang/translations/az.po +387 -0
- package/lang/translations/cs.po +32 -32
- package/lang/translations/da.po +2 -2
- package/lang/translations/de.po +2 -2
- package/lang/translations/el.po +387 -0
- package/lang/translations/en-au.po +7 -7
- package/lang/translations/en.po +2 -2
- package/lang/translations/es.po +37 -37
- package/lang/translations/et.po +2 -2
- package/lang/translations/fr.po +2 -2
- package/lang/translations/gl.po +5 -5
- package/lang/translations/hi.po +2 -2
- package/lang/translations/hr.po +15 -15
- package/lang/translations/id.po +370 -0
- package/lang/translations/it.po +4 -4
- package/lang/translations/nl.po +2 -2
- package/lang/translations/pl.po +2 -2
- package/lang/translations/pt-br.po +4 -4
- package/lang/translations/sk.po +59 -59
- package/lang/translations/sr-latn.po +4 -4
- package/lang/translations/sr.po +4 -4
- package/lang/translations/tk.po +2 -2
- package/lang/translations/tr.po +2 -2
- package/lang/translations/zh-cn.po +2 -2
- package/lang/translations/zh.po +2 -2
- package/package.json +4 -7
- package/src/commands/acceptallsuggestionscommand.js +2 -2
- package/src/commands/acceptselectedsuggestionscommand.js +2 -2
- package/src/commands/acceptsuggestioncommand.js +2 -2
- package/src/commands/discardallsuggestionscommand.js +2 -2
- package/src/commands/discardselectedsuggestionscommand.js +2 -2
- package/src/commands/discardsuggestioncommand.js +2 -2
- package/src/commands/trackchangescommand.js +2 -2
- package/src/index.js +23 -0
- package/src/integrations/alignment.js +2 -2
- package/src/integrations/basicstyles.js +2 -2
- package/src/integrations/blockquote.js +2 -2
- package/src/integrations/codeblock.js +2 -2
- package/src/integrations/comments.js +2 -2
- package/src/integrations/deletecommand.js +2 -2
- package/src/integrations/entercommand.js +2 -2
- package/src/integrations/font.js +2 -2
- package/src/integrations/heading.js +2 -2
- package/src/integrations/highlight.js +2 -2
- package/src/integrations/horizontalline.js +2 -2
- package/src/integrations/image.js +2 -2
- package/src/integrations/indent.js +2 -2
- package/src/integrations/inputcommand.js +2 -2
- package/src/integrations/link.js +2 -2
- package/src/integrations/list.js +2 -2
- package/src/integrations/mediaembed.js +2 -2
- package/src/integrations/mention.js +2 -2
- package/src/integrations/pagebreak.js +2 -2
- package/src/integrations/paragraph.js +2 -2
- package/src/integrations/removeformat.js +2 -2
- package/src/integrations/restrictededitingmode.js +2 -2
- package/src/integrations/shiftentercommand.js +2 -2
- package/src/integrations/standardeditingmode.js +2 -2
- package/src/integrations/table.js +2 -2
- package/src/integrations/tableclipboard.js +2 -2
- package/src/integrations/tableheadings.js +2 -2
- package/src/integrations/tablemergesplit.js +2 -2
- package/src/integrations/title.js +2 -2
- package/src/integrations/undo.js +2 -2
- package/src/integrations/utils.js +2 -2
- package/src/suggestion.js +2 -2
- package/src/suggestiondescriptionfactory.js +2 -2
- package/src/trackchanges.js +2 -2
- package/src/trackchangesdata.js +2 -2
- package/src/trackchangesediting.js +2 -2
- package/src/trackchangesui.js +2 -2
- package/src/ui/suggestioncontroller.js +2 -2
- package/src/ui/view/basesuggestionthreadview.js +2 -2
- package/src/ui/view/suggestionthreadview.js +2 -2
- package/src/utils/getselectedsuggestions.js +2 -2
- package/src/utils/hashobject.js +2 -2
- package/src/utils/normalizedescription.js +2 -2
- package/src/utils/sortsuggestions.js +2 -2
- package/theme/icons/track-changes-accept.svg +1 -1
- package/theme/icons/track-changes-discard.svg +1 -1
- package/theme/icons/track-changes.svg +1 -1
- package/theme/integrations/horizontalline.css +0 -15
- package/theme/integrations/image.css +0 -55
- package/theme/integrations/mediaembed.css +0 -19
- package/theme/integrations/pagebreak.css +0 -15
- package/theme/integrations/table.css +0 -147
- package/theme/suggestion.css +0 -87
- package/theme/suggestionmarker.css +0 -161
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x295c39}from'ckeditor5/src/core';import{TreeWalker as Qt}from'ckeditor5/src/engine';export default class x extends _0x295c39{['afterInit'](){const _0x4be724=this['editor'],{t:t}=_0x4be724['locale'];if(!_0x4be724['plugins']['has']('BlockQuoteEditing'))return;const _0x2b6305=_0x4be724['plugins']['get']('TrackChangesEditing'),_0x158426=this['editor']['commands']['get']('blockQuote');_0x2b6305['enableCommand']('blockQuote',(_0x5077c5,_0x2c151={})=>{const _0x15a710=this['editor']['model']['document']['selection'],_0x108cc1=_0x2c151&&void 0x0!==_0x2c151['forceValue']?_0x2c151['forceValue']:!_0x158426['value'];let _0x4bdfc6=[];if(_0x108cc1){const _0x37c09a=Array['from'](_0x15a710['getSelectedBlocks']())['filter'](_0x4a3514=>Bt(_0x4a3514)||function(_0x101434,_0x14a6bf){const _0x3ade75=_0x14a6bf['checkChild'](_0x101434['parent'],'blockQuote'),_0x416f4e=_0x14a6bf['checkChild'](['$root','blockQuote'],_0x101434);return _0x3ade75&&_0x416f4e;}(_0x4a3514,this['editor']['model']['schema']));_0x4bdfc6=Lt(_0x37c09a,_0x4be724['model']);}else{const _0x13a703=Array['from'](_0x15a710['getSelectedBlocks']())['filter'](_0x182719=>Bt(_0x182719));_0x4bdfc6=Lt(_0x13a703,_0x4be724['model']);}_0x4be724['model']['change'](()=>{for(const _0x40bc3b of _0x4bdfc6)_0x2b6305['markBlockFormat'](_0x40bc3b,{'commandName':'blockQuote','commandParams':[{'forceValue':_0x108cc1}]});});}),_0x2b6305['_descriptionFactory']['registerDescriptionCallback'](_0x17cadf=>{const {data:_0x48735e}=_0x17cadf;if(_0x48735e&&'blockQuote'==_0x48735e['commandName']){const _0xd3373d=t({'string':'block\x20quote','id':'ELEMENT_BLOCK_QUOTE'});return _0x48735e['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Format:*\x20%0',_0xd3373d)}:{'type':'format','content':t('*Remove\x20format:*\x20%0',_0xd3373d)};}});}}function Bt(_0x1e4fa6){return'blockQuote'==_0x1e4fa6['parent']['name'];}function Lt(_0x86b049,_0x445919){let _0x51ca46,_0x24c77e=0x0;const _0x24e5eb=[],_0x261b09=_0x445919['schema'];for(;_0x24c77e<_0x86b049['length'];){const _0x110c53=_0x86b049[_0x24c77e],_0x26fbdc=_0x86b049[_0x24c77e+0x1];_0x51ca46||(_0x51ca46=_0x445919['createPositionBefore'](_0x110c53)),_t(_0x445919,_0x110c53,_0x26fbdc)||(_0x24e5eb['push'](_0x445919['createRange'](_0x51ca46,_0x261b09['isObject'](_0x110c53)?_0x445919['createPositionAfter'](_0x110c53):_0x445919['createPositionAt'](_0x110c53,'end'))),_0x51ca46=null),_0x24c77e++;}return _0x24e5eb;}function _t(_0x55567a,_0x13f619,_0x432c98){if(!_0x432c98)return!0x1;const _0x1e8dd3=_0x55567a['createPositionAfter'](_0x13f619),_0x419918=_0x55567a['createPositionBefore'](_0x432c98),_0x535ed6=new Qt({'boundaries':_0x55567a['createRange'](_0x1e8dd3,_0x419918)});for(const _0x450064 of _0x535ed6)if('text'==_0x450064['type']||_0x55567a['schema']['isLimit'](_0x450064['item']))return!0x1;return!0x0;}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x4c07e4}from'ckeditor5/src/core';export default class O extends _0x4c07e4{['afterInit'](){const _0x2685f5=this['editor'],{t:t}=_0x2685f5['locale'];if(!_0x2685f5['plugins']['has']('CodeBlock'))return;_0x2685f5['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerElementLabel']('codeBlock',_0x2c7a83=>t({'string':'code\x20block','plural':'%0\x20code\x20blocks','id':'ELEMENT_CODE_BLOCK'},_0x2c7a83));}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x4b3a=['enableCommand','CommentsEditing','get','plugins','requires','editor','addCommentThread','TrackChangesEditing'];(function(_0x16b15d,_0x4b3a5a){var _0x2fcfee=function(_0x150096){while(--_0x150096){_0x16b15d['push'](_0x16b15d['shift']());}};_0x2fcfee(++_0x4b3a5a);}(_0x4b3a,0xc3));var _0x2fcf=function(_0x16b15d,_0x4b3a5a){_0x16b15d=_0x16b15d-0x0;var _0x2fcfee=_0x4b3a[_0x16b15d];return _0x2fcfee;};import{Plugin as _0x259ece}from'ckeditor5/src/core';export default class P extends _0x259ece{static get[_0x2fcf('0x1')](){return[_0x2fcf('0x6')];}['init'](){this[_0x2fcf('0x2')][_0x2fcf('0x0')][_0x2fcf('0x7')](_0x2fcf('0x4'))[_0x2fcf('0x5')](_0x2fcf('0x3'));}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3eef=['document','model','init','unlock','high','writer','addMarker:suggestion:deletion','mapper','start','get','markerNameToElements','forward','plugins','createSelection','setSelection','editing','fromRange','buffer','deleteForward','createRange','downcastDispatcher','detach','markerName','$graveyard','delete','removeMarker:suggestion:deletion','enableCommand','selection','batch','modifySelection','lock','getFirstRange','requires','data','options','end','unbindElementFromMarkerName','merge','uiElement'];(function(_0x1a57d0,_0x3eef2c){const _0xb2788e=function(_0x3360ea){while(--_0x3360ea){_0x1a57d0['push'](_0x1a57d0['shift']());}};_0xb2788e(++_0x3eef2c);}(_0x3eef,0xd2));const _0xb278=function(_0x1a57d0,_0x3eef2c){_0x1a57d0=_0x1a57d0-0x0;let _0xb2788e=_0x3eef[_0x1a57d0];return _0xb2788e;};import{Plugin as _0x4be9ac}from'ckeditor5/src/core';import{Delete as _0x4d83dd}from'ckeditor5/src/typing';import{LiveRange as _0x444834}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x2271c2}from'./utils';export default class G extends _0x4be9ac{static get[_0xb278('0x11')](){return[_0x4d83dd];}[_0xb278('0x1a')](){const _0x2ca1e4=this['editor'],_0x3594a2=_0x2ca1e4[_0xb278('0x24')][_0xb278('0x21')]('TrackChangesEditing');_0x3594a2[_0xb278('0xb')](_0xb278('0x9'));const _0xaf4790=_0x2ca1e4['commands'][_0xb278('0x21')]('deleteForward');_0x3594a2[_0xb278('0xb')](_0xb278('0x3'),(_0x43864f,_0x5742aa={})=>{const _0x256a0c=_0x2ca1e4[_0xb278('0x19')][_0xb278('0x25')](_0x2ca1e4[_0xb278('0x19')][_0xb278('0x18')][_0xb278('0xc')]);_0x256a0c['isCollapsed']&&_0x2ca1e4['model'][_0xb278('0xe')](_0x256a0c,{'direction':_0xb278('0x23'),'unit':_0x5742aa['unit']});const _0x3c34ce=_0x256a0c[_0xb278('0x10')](),_0x282daa=_0x444834[_0xb278('0x1')](_0x3c34ce);let _0x24fe25;_0x43864f(_0x5742aa),_0x24fe25=_0xb278('0x8')==_0x282daa['root']['rootName']?_0x2ca1e4['model'][_0xb278('0x4')](_0x3c34ce['start']):_0x2ca1e4[_0xb278('0x19')]['createRange'](_0x282daa[_0xb278('0x20')],_0x282daa[_0xb278('0x14')]),_0x282daa[_0xb278('0x6')](),_0x2ca1e4[_0xb278('0x19')]['enqueueChange'](_0xaf4790[_0xb278('0x2')][_0xb278('0xd')],_0x1d1a51=>{_0xaf4790[_0xb278('0x2')][_0xb278('0xf')](),_0x1d1a51[_0xb278('0x26')](_0x1d1a51[_0xb278('0x4')](_0x24fe25[_0xb278('0x14')])),_0xaf4790['buffer'][_0xb278('0x1b')]();});}),_0x2ca1e4[_0xb278('0x0')][_0xb278('0x5')]['on'](_0xb278('0x1e'),_0x2271c2(_0x2ca1e4,_0xb278('0x16')),{'priority':'high'}),_0x2ca1e4[_0xb278('0x12')][_0xb278('0x5')]['on']('addMarker:suggestion:deletion',(_0xfe8f79,_0x55bdbf,_0x391b72)=>{_0x391b72[_0xb278('0x13')]['showSuggestionHighlights']&&_0x2271c2(_0x2ca1e4,_0xb278('0x16'),{'showActiveMarker':!0x1})(_0xfe8f79,_0x55bdbf,_0x391b72);},{'priority':'high'}),_0x2ca1e4[_0xb278('0x0')]['downcastDispatcher']['on'](_0xb278('0xa'),(_0x4219ee,_0x4e1e51,_0x370d8f)=>{const _0x5c591e=_0x370d8f[_0xb278('0x1f')][_0xb278('0x22')](_0x4e1e51[_0xb278('0x7')]);if(_0x5c591e)for(const _0x1929a4 of _0x5c591e)_0x1929a4['is'](_0xb278('0x17'))&&(_0x370d8f['mapper'][_0xb278('0x15')](_0x1929a4,_0x4e1e51[_0xb278('0x7')]),_0x370d8f[_0xb278('0x1d')]['remove'](_0x1929a4));},{'priority':_0xb278('0x1c')});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x26c2=['enableCommand','editing','isAtEnd','showSuggestionHighlights','change','get','createRange','requires','isLimit','downcastDispatcher','data','selection','addMarker:suggestion:insertion','start','options','isCollapsed','high','removeMarker:suggestion:insertion','enter','init','end','ck-suggestion-marker-split','parent','model','setSelection','markerName','editor','split','getFirstRange','document','isAtStart','mapper','unbindElementFromMarkerName','schema','markerNameToElements','hasClass','nextSibling'];(function(_0x385d08,_0x26c260){const _0x2a4fce=function(_0x47ae0b){while(--_0x47ae0b){_0x385d08['push'](_0x385d08['shift']());}};_0x2a4fce(++_0x26c260);}(_0x26c2,0x150));const _0x2a4f=function(_0x385d08,_0x26c260){_0x385d08=_0x385d08-0x0;let _0x2a4fce=_0x26c2[_0x385d08];return _0x2a4fce;};import{Plugin as _0x216c60}from'ckeditor5/src/core';import{Enter as _0x4a6e6c}from'ckeditor5/src/enter';import{LiveRange as _0xecc283}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x5b485c}from'./utils';export default class F extends _0x216c60{static get[_0x2a4f('0x4')](){return[_0x4a6e6c];}[_0x2a4f('0x10')](){const _0x5a043e=this[_0x2a4f('0x17')],_0x4d75c1=_0x5a043e['plugins'][_0x2a4f('0x2')]('TrackChangesEditing');_0x4d75c1[_0x2a4f('0x22')](_0x2a4f('0xf'),_0x46b933=>{_0x5a043e[_0x2a4f('0x14')][_0x2a4f('0x1')](_0x5afd18=>{const _0x4a5a9f=_0x5a043e[_0x2a4f('0x14')][_0x2a4f('0x1a')][_0x2a4f('0x8')],_0x357089=_0x4a5a9f['getFirstPosition'](),_0x16489f=_0x4a5a9f[_0x2a4f('0xc')],_0x9435c6=_0xecc283['fromRange'](_0x4a5a9f[_0x2a4f('0x19')]()),_0x1b0ed3=_0x9435c6[_0x2a4f('0xa')]['parent'],_0xf8bfd2=_0x9435c6[_0x2a4f('0x11')]['parent'],_0x10f55d=!(_0x9435c6[_0x2a4f('0xa')][_0x2a4f('0x1b')]&&_0x9435c6[_0x2a4f('0x11')][_0x2a4f('0x24')]),_0x1f0384=_0x1b0ed3==_0xf8bfd2,_0x746f0e=!(_0x5a043e[_0x2a4f('0x14')][_0x2a4f('0x1e')][_0x2a4f('0x5')](_0x1b0ed3)||_0x5a043e[_0x2a4f('0x14')][_0x2a4f('0x1e')][_0x2a4f('0x5')](_0xf8bfd2))&&(_0x16489f||_0x10f55d&&_0x1f0384);if(_0x46b933(),_0x746f0e){const _0x37f32c=_0x5a043e[_0x2a4f('0x14')]['createPositionAt'](_0x357089[_0x2a4f('0x13')][_0x2a4f('0x21')],0x0),_0x1fc658=_0x5afd18[_0x2a4f('0x3')](_0x357089,_0x37f32c);_0x4d75c1['markInsertion'](_0x1fc658);}else _0x5afd18[_0x2a4f('0x15')](_0x5afd18[_0x2a4f('0x3')](_0x9435c6[_0x2a4f('0x11')]));_0x9435c6['detach']();});}),_0x5a043e[_0x2a4f('0x23')][_0x2a4f('0x6')]['on'](_0x2a4f('0x9'),_0x5b485c(_0x5a043e,_0x2a4f('0x18')),{'priority':_0x2a4f('0xd')}),_0x5a043e[_0x2a4f('0x23')][_0x2a4f('0x6')]['on'](_0x2a4f('0xe'),(_0x3d6630,_0x1b3a94,_0x345c49)=>{const _0x3f49da=_0x345c49[_0x2a4f('0x1c')][_0x2a4f('0x1f')](_0x1b3a94[_0x2a4f('0x16')]);if(_0x3f49da)for(const _0x170b10 of _0x3f49da)_0x170b10[_0x2a4f('0x20')](_0x2a4f('0x12'))&&(_0x345c49[_0x2a4f('0x1c')][_0x2a4f('0x1d')](_0x170b10,_0x1b3a94[_0x2a4f('0x16')]),_0x345c49['writer']['remove'](_0x170b10));},{'priority':'high'}),_0x5a043e[_0x2a4f('0x7')][_0x2a4f('0x6')]['on'](_0x2a4f('0x9'),(_0x1cc6bb,_0x43687b,_0x3440ee)=>{_0x3440ee[_0x2a4f('0xb')][_0x2a4f('0x0')]&&_0x5b485c(_0x5a043e,_0x2a4f('0x18'),{'showActiveMarker':!0x1})(_0x1cc6bb,_0x43687b,_0x3440ee);},{'priority':'high'});}}
|
package/src/integrations/font.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0xcbe0d0}from'ckeditor5/src/core';import{normalizeColorOptions as Ft}from'ckeditor5/src/ui';import{getRangesWithAttribute as Rt}from'./utils';const zt=[{'pluginName':'FontSizeEditing','commandName':'fontSize'},{'pluginName':'FontFamilyEditing','commandName':'fontFamily'},{'pluginName':'FontColorEditing','commandName':'fontColor'},{'pluginName':'FontBackgroundColorEditing','commandName':'fontBackgroundColor'}];export default class L extends _0xcbe0d0{['afterInit'](){const {t:t}=this['editor']['locale'];for(const {pluginName:_0x164a4c,commandName:_0x174f1b}of zt)this['editor']['plugins']['has'](_0x164a4c)&&this['_enableCommand'](_0x174f1b);this['editor']['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerDescriptionCallback'](_0xb5d250=>{const {data:_0x226515}=_0xb5d250;if(null!=_0x226515){if('fontSize'==_0x226515['commandName']){const _0x13bc60=_0x226515['commandParams'][0x0]['value'];if(_0x13bc60){const _0x3e53bd=this['editor']['plugins']['get']('FontSize')['normalizeSizeOptions'](this['editor']['config']['get']('fontSize.options'))['find'](_0x12e3f0=>_0x12e3f0['model']==_0x13bc60)['title'],_0x4e46c9=this['editor']['locale']['_t'](_0x3e53bd)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20size:*\x20%0',_0x4e46c9)};}return{'type':'format','content':t('*Reset\x20font\x20size*')};}if('fontFamily'==_0x226515['commandName']){const _0x526075=_0x226515['commandParams'][0x0]['value'];return _0x526075?{'type':'format','content':t('*Set\x20font\x20family:*\x20%0',_0x526075)}:{'type':'format','content':t('*Reset\x20font\x20family*')};}if('fontColor'==_0x226515['commandName']){const _0x292979=_0x226515['commandParams'][0x0]['value'];if(_0x292979){const _0x3965c1=Ft(this['editor']['config']['get']('fontColor.colors'))['find'](_0x267d1c=>_0x267d1c['model']==_0x292979);let _0x5c12ae=_0x292979,_0x207353='';return _0x3965c1&&(_0x5c12ae=_0x3965c1['label'],_0x207353=this['editor']['locale']['_t'](_0x5c12ae)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20color:*\x20%0',_0x207353)['trim'](),'color':{'value':_0x292979,'title':_0x207353||_0x5c12ae}};}return{'type':'format','content':t('*Reset\x20font\x20color*')};}if('fontBackgroundColor'==_0x226515['commandName']){const _0x18e398=_0x226515['commandParams'][0x0]['value'];if(_0x18e398){const _0x4dfa19=Ft(this['editor']['config']['get']('fontBackgroundColor.colors'))['find'](_0x570eb5=>_0x570eb5['model']==_0x18e398);let _0x1798f7=_0x18e398,_0x2a4ad1='';return _0x4dfa19&&(_0x1798f7=_0x4dfa19['label'],_0x2a4ad1=this['editor']['locale']['_t'](_0x1798f7)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20background\x20color:*\x20%0',_0x2a4ad1)['trim'](),'color':{'value':_0x18e398,'title':_0x2a4ad1||_0x1798f7}};}return{'type':'format','content':t('*Reset\x20font\x20background\x20color*')};}}});}['_enableCommand'](_0x32b725){const _0x2aa470=this['editor'];_0x2aa470['plugins']['get']('TrackChangesEditing')['enableCommand'](_0x32b725,(_0x112504,_0xc7c0b={})=>{const _0x47aba8=_0x2aa470['model']['document']['selection'],_0x495e5b=_0xc7c0b['value'];_0x47aba8['isCollapsed']?_0x112504(_0xc7c0b):_0x2aa470['model']['change'](()=>{const _0x12fccc=Array['from'](_0x47aba8['getRanges']());for(const _0x932277 of _0x12fccc){const _0x1637f8=_0x495e5b?[_0x932277]:Rt(_0x32b725,_0x932277,_0x2aa470['model']);for(const _0x59038f of _0x1637f8)_0x2aa470['plugins']['get']('TrackChangesEditing')['markInlineFormat'](_0x59038f,{'commandName':_0x32b725,'commandParams':[{'value':_0x495e5b}]});}});});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0xb47d62}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0x32ec1d}from'./utils';export default class q extends _0xb47d62{['afterInit'](){const _0x36004d=this['editor'],{t:t}=_0x36004d['locale'],_0x4279be=_0x36004d['config']['get']('heading.options');if(!_0x36004d['plugins']['has']('HeadingEditing'))return;const _0x117ed7=_0x36004d['plugins']['get']('TrackChangesEditing');_0x117ed7['enableCommand']('heading',(_0x2ad656,_0x5a3605)=>{const _0xe95430=_0x5a3605['value'],_0x4445ab=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x1cece6=>function(_0x3d23e,_0xfd7b23,_0x5d223c){return _0x5d223c['checkChild'](_0x3d23e['parent'],_0xfd7b23)&&!_0x5d223c['isObject'](_0x3d23e)&&_0x3d23e['name']!=_0xfd7b23;}(_0x1cece6,_0xe95430,this['editor']['model']['schema']));_0x36004d['model']['change'](()=>{for(const _0x1608d0 of _0x4445ab)_0x117ed7['markBlockFormat'](_0x1608d0,{'commandName':'heading','commandParams':[_0x5a3605],'formatGroupId':'blockName'},_0x32ec1d(_0x1608d0));});});for(const _0x21663b of _0x4279be)'paragraph'!=_0x21663b['model']&&_0x117ed7['_descriptionFactory']['registerElementLabel'](_0x21663b['model'],_0x4210f4=>{const _0x49bdba=tn(_0x21663b['model']);return null!==_0x49bdba?_0x3746ad(_0x4210f4,_0x49bdba):_0xcd77d7(_0x4210f4,_0x21663b['title']);});function _0x3746ad(_0x5b23cf,_0x11af11){return t({'string':'heading\x20(level\x20%1)','plural':'%0\x20headings\x20(level\x20%1)','id':'ELEMENT_HEADING'},[_0x5b23cf,_0x11af11]);}function _0xcd77d7(_0x38e7b4,_0x521355){return t({'string':'heading\x20(%1)','plural':'%0\x20headings\x20(%1)','id':'ELEMENT_HEADING_CUSTOM'},[_0x38e7b4,_0x521355]);}_0x117ed7['_descriptionFactory']['registerDescriptionCallback'](_0x5bd689=>{const {type:_0x201986,data:_0x48d3ca}=_0x5bd689;if('formatBlock'==_0x201986&&_0x48d3ca&&'heading'==_0x48d3ca['commandName']){const _0x580367=_0x48d3ca['commandParams'][0x0]['value'],_0x437f4d=tn(_0x580367);if(null!==_0x437f4d)return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x3746ad(0x1,_0x437f4d))};const _0x3ee6f1=_0x4279be['find'](_0xb19343=>_0xb19343['model']===_0x580367)['title'];return{'type':'format','content':t('*Change\x20to:*\x20%0',_0xcd77d7(0x1,_0x3ee6f1))};}});}}function tn(_0xb976f8){const _0x46ca4e=_0xb976f8['match'](/^heading(\d+)$/);return _0x46ca4e?_0x46ca4e[0x1]:null;}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x445cd4}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class H extends _0x445cd4{['afterInit'](){const _0x23a06d=this['editor'];if(!_0x23a06d['plugins']['has']('HighlightEditing'))return;const _0xda63aa=_0x23a06d['plugins']['get']('TrackChangesEditing');_0xda63aa['enableCommand']('highlight',(_0x3be3f6,_0x45f48e={})=>{const _0x1fb076=_0x23a06d['model']['document']['selection'],_0x54c517=_0x1fb076['getAttribute']('highlight');let _0x1db34a=_0x45f48e['value'],_0x242d2c=[];if(_0x1fb076['isCollapsed']){const _0x5a1fae=_0x1fb076['getFirstPosition']();if(!_0x1fb076['hasAttribute']('highlight'))return void _0x3be3f6(_0x45f48e);{const _0x5971ab=_0x2cb28b=>_0x2cb28b['item']['getAttribute']('highlight')===_0x54c517,_0x44b6ff=_0x5a1fae['getLastMatchingPosition'](_0x5971ab,{'direction':'backward'}),_0xd5564=_0x5a1fae['getLastMatchingPosition'](_0x5971ab);_0x242d2c=[_0x23a06d['model']['createRange'](_0x44b6ff,_0xd5564)],_0x1db34a==_0x54c517&&(_0x1db34a=null);}}else for(const _0x3fd12c of _0x1fb076['getRanges']())_0x1db34a?_0x242d2c['push'](_0x3fd12c):_0x242d2c['push'](...Rt('highlight',_0x3fd12c,_0x23a06d['model']));_0x23a06d['model']['change'](()=>{for(const _0x57c7e7 of _0x242d2c)_0xda63aa['markInlineFormat'](_0x57c7e7,{'commandName':'highlight','commandParams':[{'value':_0x1db34a}]});});});const {t:t}=_0x23a06d['locale'];_0xda63aa['_descriptionFactory']['registerDescriptionCallback'](_0x3e8bee=>{const {type:_0x3db140,data:_0x27946a}=_0x3e8bee;if('formatInline'==_0x3db140&&_0x27946a&&'highlight'==_0x27946a['commandName']){const _0x5f42d5=_0x27946a['commandParams'][0x0]['value'];if(_0x5f42d5){const _0x2e9346=_0x23a06d['config']['get']('highlight.options')['find'](_0x5da34b=>_0x5da34b['model']==_0x5f42d5),_0x56f92b=_0x23a06d['locale']['_t'](_0x2e9346['title'])['toLowerCase']();return{'type':'format','content':t('*Set\x20highlight:*\x20%0',_0x56f92b),'color':{'value':_0x2e9346['color'],'title':_0x2e9346['title']}};}return{'type':'format','content':t('*Remove\x20highlight*',t({'string':'highlight','id':'FORMAT_HIGHLIGHT'}))};}});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1315c3}from'ckeditor5/src/core';export default class W extends _0x1315c3{['afterInit'](){const _0x326a24=this['editor'];if(!_0x326a24['plugins']['has']('HorizontalLineEditing'))return;_0x326a24['plugins']['get']('TrackChangesEditing')['enableCommand']('horizontalLine');const _0x4f170b=_0x326a24['plugins']['get']('TrackChangesEditing'),{t:t}=_0x326a24['locale'];_0x4f170b['_descriptionFactory']['registerElementLabel']('horizontalLine',_0x2dea16=>t({'string':'horizontal\x20line','plural':'%0\x20horizontal\x20lines','id':'ELEMENT_HORIZONTAL_LINE'},_0x2dea16)),_0x326a24['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4b8826,{writer:_0x1a80e5,options:_0xfd3487})=>{if(!_0xfd3487['showSuggestionHighlights'])return;const _0x3161ca=_0x1a80e5['createContainerElement']('div'),_0x5e25ee=_0x1a80e5['createEmptyElement']('hr');return _0x1a80e5['addClass']('ck-horizontal-line',_0x3161ca),_0x1a80e5['insert'](_0x1a80e5['createPositionAt'](_0x3161ca,0x0),_0x5e25ee),_0x3161ca;},'converterPriority':'high'});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x248c82}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x389158}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x4a95b3}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class V extends _0x248c82{['afterInit'](){const _0x2397a1=this['editor'];if(!_0x2397a1['plugins']['has']('ImageEditing'))return;const _0x2ab318=_0x2397a1['plugins']['get']('TrackChangesEditing'),_0x3b6485=_0x2397a1['plugins']['get']('ImageUtils'),_0x166ade={},{t:t}=_0x2397a1['locale'];if(_0x2ab318['enableCommand']('insertImage'),_0x2ab318['_descriptionFactory']['registerElementLabel']('imageBlock',_0x316716=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x316716)),_0x2ab318['_descriptionFactory']['registerElementLabel']('imageInline',_0x1c6693=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x1c6693)),_0x2ab318['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x2397a1['plugins']['has']('ImageUploadEditing')&&_0x2ab318['enableCommand']('uploadImage'),_0x2397a1['plugins']['has']('ImageBlockEditing')&&_0x2397a1['plugins']['has']('ImageInlineEditing')&&(_0x2ab318['enableCommand']('imageTypeInline',(_0x2c605c,_0x4f841f)=>{const _0x3b1a97=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x3b1a97,{'commandName':'imageTypeInline','commandParams':[_0x4f841f]},[],'convertBlockImageToInline');});}),_0x2ab318['enableCommand']('imageTypeBlock',(_0x1ea9b,_0x5c6524)=>{_0x2397a1['model']['change'](_0x33beed=>{let _0x463273=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x1fae67=_0x33beed['createRangeOn'](_0x463273);const _0x30ab20=te['fromPosition'](_0x1fae67['start'],'toPrevious'),_0x458682=te['fromPosition'](_0x1fae67['end'],'toNext');_0x2ab318['forceDefaultExecution'](()=>_0x1ea9b(_0x5c6524)),_0x463273=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x1fae67=_0x33beed['createRangeOn'](_0x463273);const _0x6db590=_0x33beed['createRange'](_0x30ab20,_0x458682);_0x30ab20['detach'](),_0x458682['detach'](),_0x2ab318['markBlockFormat'](_0x463273,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x6db590['start']['isBefore'](_0x1fae67['start'])&&_0x2ab318['markInsertion'](_0x33beed['createRange'](_0x6db590['start'],_0x1fae67['start']),'convertInlineImageToBlock'),_0x1fae67['end']['isBefore'](_0x6db590['end'])&&_0x2ab318['markInsertion'](_0x33beed['createRange'](_0x1fae67['end'],_0x6db590['end']),'convertInlineImageToBlock');});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x2ab318['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x1f83fc])=>{const _0x13921e=_0x2ab318['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x14616f=_0x1f83fc['start'],_0x1d707d=_0x1f83fc['end'];const _0x4e407c=_0x2397a1['model']['schema']['getNearestSelectionRange'](_0x14616f,'backward'),_0x324f25=_0x2397a1['model']['schema']['getNearestSelectionRange'](_0x1d707d,'forward');_0x4e407c['isCollapsed']&&(_0x14616f=_0x4e407c['start']),_0x324f25['isCollapsed']&&(_0x1d707d=_0x324f25['end']),_0x13921e([_0x2397a1['model']['createRange'](_0x14616f,_0x1d707d)]);}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0x168517),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0x168517)),_0x2397a1['plugins']['has']('ImageCaptionEditing')&&(_0x2ab318['enableCommand']('toggleImageCaption',(_0x18a308,_0x3da695)=>{let _0x449561=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x37f2e3=_0x4a95b3(_0x449561);_0x2397a1['model']['change'](()=>{if(_0x37f2e3)return void _0x2ab318['markDeletion'](_0x2397a1['model']['createRangeOn'](_0x37f2e3));const _0x2ab4a9=_0x3b6485['isBlockImage'](_0x449561);_0x18a308(_0x3da695),_0x449561=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x37f2e3=_0x4a95b3(_0x449561),_0x2ab318['markInsertion'](_0x2397a1['model']['createRangeOn'](_0x37f2e3),_0x2ab4a9?null:'imageCaption');});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0x168517)),_0x2397a1['plugins']['has']('ImageStyleEditing')){_0x2ab318['enableCommand']('imageStyle',(_0x1ae775,_0x4537ab)=>{const _0x444e7b=_0x2397a1['plugins']['get']('Users')['me'],_0x525668=_0x2397a1['commands']['get']('imageStyle');let _0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x10859f=_0x2397a1['model']['createRangeOn'](_0x1ac194),_0x4f85b2=_0x525668['value'];if(_0x4f85b2==_0x4537ab['value'])return;const _0x2899b6={'commandName':'imageStyle','commandParams':[_0x4537ab],'formatGroupId':_0x389158()};_0x2397a1['model']['change'](()=>{if(_0x2ab318['getSuggestions']()['filter'](_0x2b1441=>_0x2b1441['isInContent']&&_0x444e7b==_0x2b1441['author']&&('formatBlock'==_0x2b1441['type']||'formatInline'==_0x2b1441['type'])&&('imageStylePreApply'==_0x2b1441['subType']||'imageStylePostApply'==_0x2b1441['subType'])&&_0x2b1441['getFirstRange']()['isEqual'](_0x10859f))['forEach'](_0x13ffc8=>_0x2ab318['discardSuggestion'](_0x13ffc8['head'])),_0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),_0x10859f=_0x2397a1['model']['createRangeOn'](_0x1ac194),_0x525668['refresh'](),_0x2397a1['commands']['get']('imageTypeInline')['refresh'](),_0x2397a1['commands']['get']('imageTypeBlock')['refresh'](),_0x4f85b2=_0x525668['value'],_0x4f85b2!=_0x4537ab['value'])return _0x3b6485['isInlineImage'](_0x1ac194)&&_0x525668['shouldConvertImageType'](_0x4537ab['value'],_0x1ac194)?(_0x1ae775(_0x4537ab),_0x1ac194=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']),void _0x2ab318['markBlockFormat'](_0x1ac194,{..._0x2899b6,'commandReversedParams':[{'value':_0x4f85b2||null}]},[],'imageStylePreApply')):void(_0x3b6485['isBlockImage'](_0x1ac194)?_0x2ab318['markBlockFormat'](_0x1ac194,_0x2899b6,[],'imageStylePostApply'):_0x2ab318['markInlineFormat'](_0x10859f,_0x2899b6,'imageStylePostApply'));});});for(const _0x5384a7 of _0x2397a1['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x166ade[_0x5384a7['name']]=_0x5384a7['title']['toLowerCase']();_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x36b276,_0x389a9d)=>{_0x2ab318['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x36b276,{'commandName':_0x389a9d['commandName'],'commandParams':_0x389a9d['commandReversedParams']});}),_0x2ab318['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0x168517);}const _0x2e7385=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x3c4d2f(_0x23df94,_0x5545f5){const _0xcf19ae=_0x2e7385['findIndex'](({type:_0x42d133,subType:_0x100c1e})=>_0x23df94['type']==_0x42d133&&_0x23df94['subType']==_0x100c1e),_0x24be64=_0x2e7385['findIndex'](({type:_0x20c714,subType:_0x44aa56})=>_0x5545f5['type']==_0x20c714&&_0x5545f5['subType']==_0x44aa56);if(_0xcf19ae<0x0||_0x24be64<0x0)return!0x1;const _0x287a4a=_0x23df94['getFirstRange'](),_0x2c515e=_0x5545f5['getFirstRange']();if((0x0==_0xcf19ae||0x1==_0xcf19ae)&&0x2==_0x24be64&&_0x287a4a['isIntersecting'](_0x2c515e))return!0x0;if(0x2==_0xcf19ae&&0x3==_0x24be64){const _0x5a5d49=_0x2ab318['_findSuggestions'](_0x287a4a,'insertion')['filter'](({suggestion:_0x49d07e,meta:_0x248ceb})=>_0x248ceb['isOwn']&&'convertInlineImageToBlock'==_0x49d07e['subType']);if(_0x5a5d49['length']>0x1&&_0x2c515e['end']['isEqual'](_0x287a4a['start']))return!0x0;if(0x1==_0x5a5d49['length']&&(_0x287a4a['start']['isEqual'](_0x2c515e['end'])||_0x287a4a['end']['isEqual'](_0x2c515e['start'])))return!0x0;}if(0x3==_0xcf19ae&&0x3==_0x24be64&&_0x287a4a['start']['isBefore'](_0x2c515e['start'])){const _0x1df20e=_0x287a4a['end']['nodeAfter'],_0x70a311=_0x2c515e['start']['nodeBefore'];return _0x3b6485['isBlockImage'](_0x1df20e)&&_0x1df20e===_0x70a311;}return!0x1;}function _0x168517(_0x53a7d9,_0x1eee94){return _0x3c4d2f(_0x53a7d9,_0x1eee94)?[_0x53a7d9,_0x1eee94]:_0x3c4d2f(_0x1eee94,_0x53a7d9)?[_0x1eee94,_0x53a7d9]:null;}_0x2397a1['model']['document']['registerPostFixer'](()=>{let _0x30486d=!0x1;const _0x119470=Array['from'](_0x2397a1['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x32fdfa,data:_0x46017f}of _0x119470){const {group:_0x1e4695,type:_0x56ebe7,subType:_0x27d479,id:_0x33e31f}=_0x2ab318['_splitMarkerName'](_0x32fdfa);if('suggestion'==_0x1e4695&&_0x2ab318['hasSuggestion'](_0x33e31f)){if('formatBlock'==_0x56ebe7&&('imageStylePreApply'==_0x27d479||'imageStylePostApply'==_0x27d479)){const _0x4a949a=_0x2ab318['getSuggestion'](_0x33e31f);if(_0x46017f['newRange']){const _0x169f8b=_0x4a949a['getFirstRange']()['getContainedElement']();if(_0x3b6485['isBlockImage'](_0x169f8b))continue;_0x2ab318['discardSuggestion'](_0x4a949a),_0x30486d=!0x0;}}if('insertion'==_0x56ebe7&&'imageCaption'==_0x27d479&&!_0x46017f['newRange']){const _0x344291=_0x2ab318['getSuggestion'](_0x33e31f);_0x344291['next']&&_0x344291['next']['isInContent']&&(_0x2ab318['discardSuggestion'](_0x344291['next']),_0x30486d=!0x0);}}}return _0x30486d;}),_0x2397a1['plugins']['has']('ImageResize')&&_0x2ab318['enableCommand']('resizeImage',(_0x48b7ae,_0xa34f5c)=>{const _0x30c294=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);_0x30c294['getAttribute']('width')!=_0xa34f5c['width']&&_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x30c294,{'commandName':'resizeImage','commandParams':[_0xa34f5c]});});}),_0x2397a1['plugins']['has']('ImageTextAlternativeEditing')&&_0x2ab318['enableCommand']('imageTextAlternative',(_0x6c3715,_0x269a06)=>{const _0x438f19=_0x3b6485['getClosestSelectedImageElement'](_0x2397a1['model']['document']['selection']);(_0x438f19['hasAttribute']('alt')?_0x438f19['getAttribute']('alt'):'')!=_0x269a06['newValue']&&_0x2397a1['model']['change'](()=>{_0x2ab318['markBlockFormat'](_0x438f19,{'commandName':'imageTextAlternative','commandParams':[_0x269a06]});});}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x34216b=>{if(!!_0x2e7385['find'](({type:_0x47ca7f,subType:_0x36e6d9})=>_0x34216b['type']==_0x47ca7f&&_0x34216b['subType']==_0x36e6d9))return _0x34216b['previous']?{}:void 0x0;}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x5a1723=>{if('insertion'==_0x5a1723['type']||'deletion'==_0x5a1723['type']){const _0x1e3cb6=_0x5a1723['getContainedElement']();if(_0x1e3cb6&&_0x1e3cb6['is']('element','caption'))return{'type':'insertion'==_0x5a1723['type']?'addObject':'removeObject','name':_0x1e3cb6['name'],'quantity':0x1};}}),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x1ab3b3=>'formatBlock'==_0x1ab3b3['type']&&'convertInlineImageToBlock'==_0x1ab3b3['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x1ab3b3['type']&&'convertBlockImageToInline'==_0x1ab3b3['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x2ab318['_descriptionFactory']['registerDescriptionCallback'](_0x4d5f36=>{const {data:_0x4d402d}=_0x4d5f36;if(_0x4d402d){if('imageStyle'==_0x4d402d['commandName']){const _0x3ff01f=_0x4d402d['commandParams'][0x0]['value'];return _0x2ab261('side'===_0x3ff01f?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x166ade[_0x3ff01f]||_0x3ff01f);}if('imageTextAlternative'==_0x4d402d['commandName']){const _0x448b52=_0x4d402d['commandParams'][0x0]['newValue'];return _0x448b52?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x448b52+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x4d402d['commandName']){const _0x116ef8=_0x4d402d['commandParams'][0x0]['width'];return _0x116ef8?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x116ef8)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x2ab261(_0x3c6e1b){return{'type':'format','content':t('*Format:*\x20%0',_0x3c6e1b)};}});}}
|
|
23
|
+
import{Plugin as _0x3abc38}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0xe2a4f5}from'ckeditor5/src/utils';export default class z extends _0x3abc38{['afterInit'](){const _0x5d1fb1=this['editor'];if(!_0x5d1fb1['plugins']['has']('ImageEditing'))return;const _0x29a2c7=_0x5d1fb1['plugins']['get']('TrackChangesEditing'),_0x54c22e=_0x5d1fb1['plugins']['get']('ImageUtils'),_0x337e07={},{t:t}=_0x5d1fb1['locale'];if(_0x29a2c7['enableCommand']('insertImage'),_0x29a2c7['_descriptionFactory']['registerElementLabel']('imageBlock',_0x2c88fb=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x2c88fb)),_0x29a2c7['_descriptionFactory']['registerElementLabel']('imageInline',_0x4a0123=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x4a0123)),_0x29a2c7['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x5d1fb1['plugins']['has']('ImageUploadEditing')&&_0x29a2c7['enableCommand']('uploadImage'),_0x5d1fb1['plugins']['has']('ImageBlockEditing')&&_0x5d1fb1['plugins']['has']('ImageInlineEditing')&&(_0x29a2c7['enableCommand']('imageTypeInline',(_0xd929e2,_0x4a27fe)=>{const _0x5057dd=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']);_0x5d1fb1['model']['change'](()=>{_0x29a2c7['markBlockFormat'](_0x5057dd,{'commandName':'imageTypeInline','commandParams':[_0x4a27fe]},[],'convertBlockImageToInline');});}),_0x29a2c7['enableCommand']('imageTypeBlock',(_0xefaade,_0x5b6531)=>{_0x5d1fb1['model']['change'](_0x49fd41=>{let _0x198628=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x14ead2=_0x49fd41['createRangeOn'](_0x198628);const _0x493104=te['fromPosition'](_0x14ead2['start'],'toPrevious'),_0xd94499=te['fromPosition'](_0x14ead2['end'],'toNext');_0x29a2c7['forceDefaultExecution'](()=>_0xefaade(_0x5b6531)),_0x198628=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x14ead2=_0x49fd41['createRangeOn'](_0x198628);const _0x2fb690=_0x49fd41['createRange'](_0x493104,_0xd94499);_0x493104['detach'](),_0xd94499['detach'](),_0x29a2c7['markBlockFormat'](_0x198628,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x2fb690['start']['isBefore'](_0x14ead2['start'])&&_0x29a2c7['markInsertion'](_0x49fd41['createRange'](_0x2fb690['start'],_0x14ead2['start']),'convertInlineImageToBlock'),_0x14ead2['end']['isBefore'](_0x2fb690['end'])&&_0x29a2c7['markInsertion'](_0x49fd41['createRange'](_0x14ead2['end'],_0x2fb690['end']),'convertInlineImageToBlock');});}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x29a2c7['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x129576])=>{const _0x3f7636=_0x29a2c7['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x1da999=_0x129576['start'],_0x1efad2=_0x129576['end'];const _0x38c554=_0x5d1fb1['model']['schema']['getNearestSelectionRange'](_0x1da999,'backward'),_0x1455a8=_0x5d1fb1['model']['schema']['getNearestSelectionRange'](_0x1efad2,'forward');_0x38c554['isCollapsed']&&(_0x1da999=_0x38c554['start']),_0x1455a8['isCollapsed']&&(_0x1efad2=_0x1455a8['end']),_0x3f7636([_0x5d1fb1['model']['createRange'](_0x1da999,_0x1efad2)]);}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0x417d1f),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0x417d1f)),_0x5d1fb1['plugins']['has']('ImageCaptionEditing')&&(_0x29a2c7['enableCommand']('toggleImageCaption',(_0x2f86e8,_0x675b84)=>{const _0x236cbe=_0x5d1fb1['plugins']['get']('ImageCaptionUtils');let _0x5eaa06=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x585ff7=_0x236cbe['getCaptionFromImageModelElement'](_0x5eaa06);_0x5d1fb1['model']['change'](()=>{if(_0x585ff7)return void _0x29a2c7['markDeletion'](_0x5d1fb1['model']['createRangeOn'](_0x585ff7));const _0x22b52f=_0x54c22e['isBlockImage'](_0x5eaa06);_0x2f86e8(_0x675b84),_0x5eaa06=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x585ff7=_0x236cbe['getCaptionFromImageModelElement'](_0x5eaa06),_0x29a2c7['markInsertion'](_0x5d1fb1['model']['createRangeOn'](_0x585ff7),_0x22b52f?null:'imageCaption');});}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0x417d1f)),_0x5d1fb1['plugins']['has']('ImageStyleEditing')){_0x29a2c7['enableCommand']('imageStyle',(_0x442579,_0xcc67e1)=>{const _0x248006=_0x5d1fb1['plugins']['get']('Users')['me'],_0x49e9a1=_0x5d1fb1['commands']['get']('imageStyle');let _0x2c414a=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x1d6940=_0x5d1fb1['model']['createRangeOn'](_0x2c414a),_0x256d12=_0x49e9a1['value'];if(_0x256d12==_0xcc67e1['value'])return;const _0x28d9c6={'commandName':'imageStyle','commandParams':[_0xcc67e1],'formatGroupId':_0xe2a4f5()};_0x5d1fb1['model']['change'](()=>{if(_0x29a2c7['getSuggestions']()['filter'](_0x4884e0=>_0x4884e0['isInContent']&&_0x248006==_0x4884e0['author']&&('formatBlock'==_0x4884e0['type']||'formatInline'==_0x4884e0['type'])&&('imageStylePreApply'==_0x4884e0['subType']||'imageStylePostApply'==_0x4884e0['subType'])&&_0x4884e0['getFirstRange']()['isEqual'](_0x1d6940))['forEach'](_0x1a737a=>_0x29a2c7['discardSuggestion'](_0x1a737a['head'])),_0x2c414a=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),_0x1d6940=_0x5d1fb1['model']['createRangeOn'](_0x2c414a),_0x49e9a1['refresh'](),_0x5d1fb1['commands']['get']('imageTypeInline')['refresh'](),_0x5d1fb1['commands']['get']('imageTypeBlock')['refresh'](),_0x256d12=_0x49e9a1['value'],_0x256d12!=_0xcc67e1['value'])return _0x54c22e['isInlineImage'](_0x2c414a)&&_0x49e9a1['shouldConvertImageType'](_0xcc67e1['value'],_0x2c414a)?(_0x442579(_0xcc67e1),_0x2c414a=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']),void _0x29a2c7['markBlockFormat'](_0x2c414a,{..._0x28d9c6,'commandReversedParams':[{'value':_0x256d12||null}]},[],'imageStylePreApply')):void(_0x54c22e['isBlockImage'](_0x2c414a)?_0x29a2c7['markBlockFormat'](_0x2c414a,_0x28d9c6,[],'imageStylePostApply'):_0x29a2c7['markInlineFormat'](_0x1d6940,_0x28d9c6,'imageStylePostApply'));});});for(const _0x582f24 of _0x5d1fb1['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x337e07[_0x582f24['name']]=_0x582f24['title']['toLowerCase']();_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x52c507,_0x4326cc)=>{_0x29a2c7['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x52c507,{'commandName':_0x4326cc['commandName'],'commandParams':_0x4326cc['commandReversedParams']});}),_0x29a2c7['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0x417d1f);}const _0x12c528=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x29c753(_0x11b565,_0x341fa7){const _0x5ba78a=_0x12c528['findIndex'](({type:_0x5ad095,subType:_0x2aed18})=>_0x11b565['type']==_0x5ad095&&_0x11b565['subType']==_0x2aed18),_0x399544=_0x12c528['findIndex'](({type:_0x43af76,subType:_0x15dd46})=>_0x341fa7['type']==_0x43af76&&_0x341fa7['subType']==_0x15dd46);if(_0x5ba78a<0x0||_0x399544<0x0)return!0x1;const _0x1cd459=_0x11b565['getFirstRange'](),_0x14fafe=_0x341fa7['getFirstRange']();if((0x0==_0x5ba78a||0x1==_0x5ba78a)&&0x2==_0x399544&&_0x1cd459['isIntersecting'](_0x14fafe))return!0x0;if(0x2==_0x5ba78a&&0x3==_0x399544){const _0x31e85c=_0x29a2c7['_findSuggestions'](_0x1cd459,'insertion')['filter'](({suggestion:_0x1705d0,meta:_0x5adc4c})=>_0x5adc4c['isOwn']&&'convertInlineImageToBlock'==_0x1705d0['subType']);if(_0x31e85c['length']>0x1&&_0x14fafe['end']['isEqual'](_0x1cd459['start']))return!0x0;if(0x1==_0x31e85c['length']&&(_0x1cd459['start']['isEqual'](_0x14fafe['end'])||_0x1cd459['end']['isEqual'](_0x14fafe['start'])))return!0x0;}if(0x3==_0x5ba78a&&0x3==_0x399544&&_0x1cd459['start']['isBefore'](_0x14fafe['start'])){const _0x4119bc=_0x1cd459['end']['nodeAfter'],_0x5d026c=_0x14fafe['start']['nodeBefore'];return _0x54c22e['isBlockImage'](_0x4119bc)&&_0x4119bc===_0x5d026c;}return!0x1;}function _0x417d1f(_0xa7326b,_0x5198c9){return _0x29c753(_0xa7326b,_0x5198c9)?[_0xa7326b,_0x5198c9]:_0x29c753(_0x5198c9,_0xa7326b)?[_0x5198c9,_0xa7326b]:null;}_0x5d1fb1['model']['document']['registerPostFixer'](()=>{let _0x517576=!0x1;const _0xeb9d42=Array['from'](_0x5d1fb1['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x5b0e64,data:_0x4d3ee2}of _0xeb9d42){const {group:_0x28368f,type:_0x4713d4,subType:_0x504fa6,id:_0x259c1}=_0x29a2c7['_splitMarkerName'](_0x5b0e64);if('suggestion'==_0x28368f&&_0x29a2c7['hasSuggestion'](_0x259c1)){if('formatBlock'==_0x4713d4&&('imageStylePreApply'==_0x504fa6||'imageStylePostApply'==_0x504fa6)){const _0x41663f=_0x29a2c7['getSuggestion'](_0x259c1);if(_0x4d3ee2['newRange']){const _0x172a95=_0x41663f['getFirstRange']()['getContainedElement']();if(_0x54c22e['isBlockImage'](_0x172a95))continue;_0x29a2c7['discardSuggestion'](_0x41663f),_0x517576=!0x0;}}if('insertion'==_0x4713d4&&'imageCaption'==_0x504fa6&&!_0x4d3ee2['newRange']){const _0x1a98e6=_0x29a2c7['getSuggestion'](_0x259c1);_0x1a98e6['next']&&_0x1a98e6['next']['isInContent']&&(_0x29a2c7['discardSuggestion'](_0x1a98e6['next']),_0x517576=!0x0);}}}return _0x517576;}),_0x5d1fb1['plugins']['has']('ImageResize')&&_0x29a2c7['enableCommand']('resizeImage',(_0x4610ef,_0x1f13c9)=>{const _0x213768=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']);_0x213768['getAttribute']('width')!=_0x1f13c9['width']&&_0x5d1fb1['model']['change'](()=>{_0x29a2c7['markBlockFormat'](_0x213768,{'commandName':'resizeImage','commandParams':[_0x1f13c9]});});}),_0x5d1fb1['plugins']['has']('ImageTextAlternativeEditing')&&_0x29a2c7['enableCommand']('imageTextAlternative',(_0x3e0083,_0x76156e)=>{const _0x552f0d=_0x54c22e['getClosestSelectedImageElement'](_0x5d1fb1['model']['document']['selection']);(_0x552f0d['hasAttribute']('alt')?_0x552f0d['getAttribute']('alt'):'')!=_0x76156e['newValue']&&_0x5d1fb1['model']['change'](()=>{_0x29a2c7['markBlockFormat'](_0x552f0d,{'commandName':'imageTextAlternative','commandParams':[_0x76156e]});});}),_0x29a2c7['_descriptionFactory']['registerDescriptionCallback'](_0x18e722=>{if(!!_0x12c528['find'](({type:_0x5e6aca,subType:_0x36ed65})=>_0x18e722['type']==_0x5e6aca&&_0x18e722['subType']==_0x36ed65))return _0x18e722['previous']?{}:void 0x0;}),_0x29a2c7['_descriptionFactory']['registerDescriptionCallback'](_0xd79365=>{if('insertion'==_0xd79365['type']||'deletion'==_0xd79365['type']){const _0x3b061a=_0xd79365['getContainedElement']();if(_0x3b061a&&_0x3b061a['is']('element','caption'))return{'type':'insertion'==_0xd79365['type']?'addObject':'removeObject','name':_0x3b061a['name'],'quantity':0x1};}}),_0x29a2c7['_descriptionFactory']['registerDescriptionCallback'](_0xea92c7=>'formatBlock'==_0xea92c7['type']&&'convertInlineImageToBlock'==_0xea92c7['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0xea92c7['type']&&'convertBlockImageToInline'==_0xea92c7['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x29a2c7['_descriptionFactory']['registerDescriptionCallback'](_0x3b22a5=>{const {data:_0x2bad7e}=_0x3b22a5;if(_0x2bad7e){if('imageStyle'==_0x2bad7e['commandName']){const _0x31fb45=_0x2bad7e['commandParams'][0x0]['value'];return _0x5a057a('side'===_0x31fb45?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x337e07[_0x31fb45]||_0x31fb45);}if('imageTextAlternative'==_0x2bad7e['commandName']){const _0x13be7f=_0x2bad7e['commandParams'][0x0]['newValue'];return _0x13be7f?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x13be7f+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x2bad7e['commandName']){const _0x377b08=_0x2bad7e['commandParams'][0x0]['width'];return _0x377b08?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x377b08)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x5a057a(_0x932066){return{'type':'format','content':t('*Format:*\x20%0',_0x932066)};}});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5bddf9}from'ckeditor5/src/core';export default class J extends _0x5bddf9{['afterInit'](){const _0xe80b4a=this['editor'],_0x36a2ce=_0xe80b4a['plugins']['get']('TrackChangesEditing');_0xe80b4a['plugins']['has']('IndentEditing')&&(_0x36a2ce['enableCommand']('indent'),_0x36a2ce['enableCommand']('outdent'));const {t:t}=_0xe80b4a['locale'];if(_0xe80b4a['plugins']['has']('IndentBlock')){for(const _0x40fbc9 of['indentBlock','outdentBlock'])_0x36a2ce['enableCommand'](_0x40fbc9,()=>{const _0x2ff260=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0xdd60e2=>this['editor']['model']['schema']['checkAttribute'](_0xdd60e2,'blockIndent'));_0xe80b4a['model']['change'](()=>{for(const _0xef7aa6 of _0x2ff260)_0x36a2ce['markBlockFormat'](_0xef7aa6,{'commandName':_0x40fbc9,'commandParams':[{'value':''}],'formatGroupId':'indentBlock'});});});_0x36a2ce['_descriptionFactory']['registerDescriptionCallback'](_0x25be57=>{const {data:_0x1d27b5}=_0x25be57;if(!_0x1d27b5)return;if('indentBlock'!=_0x1d27b5['commandName']&&'outdentBlock'!=_0x1d27b5['commandName'])return;const _0x525332=_0x25be57['getItems']()[0x0],_0x12b360=_0x36a2ce['_descriptionFactory']['getItemLabel'](_0x525332['name']);return'indentBlock'==_0x1d27b5['commandName']?{'type':'format','content':t('*Indent:*\x20%0',_0x12b360)}:'outdentBlock'==_0x1d27b5['commandName']?{'type':'format','content':t('*Outdent:*\x20%0',_0x12b360)}:void 0x0;});}}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x1171=['TrackChangesEditing','init','input','editor','plugins','enableCommand','get'];(function(_0x23c841,_0x117173){var _0x85e675=function(_0x145116){while(--_0x145116){_0x23c841['push'](_0x23c841['shift']());}};_0x85e675(++_0x117173);}(_0x1171,0xfa));var _0x85e6=function(_0x23c841,_0x117173){_0x23c841=_0x23c841-0x0;var _0x85e675=_0x1171[_0x23c841];return _0x85e675;};import{Plugin as _0xcc99bb}from'ckeditor5/src/core';import{Input as _0x44bede}from'ckeditor5/src/typing';export default class K extends _0xcc99bb{static get['requires'](){return[_0x44bede];}[_0x85e6('0x3')](){this[_0x85e6('0x5')][_0x85e6('0x6')][_0x85e6('0x1')](_0x85e6('0x2'))[_0x85e6('0x0')](_0x85e6('0x4'));}}
|
package/src/integrations/link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x387ba0}from'ckeditor5/src/core';import{findAttributeRange as _0x6c8a7b}from'ckeditor5/src/typing';import{getRangesWithAttribute as Rt}from'./utils';export default class Q extends _0x387ba0{['afterInit'](){const _0x591a88=this['editor'];if(!_0x591a88['plugins']['has']('LinkEditing'))return;const _0x2b0fdb=_0x591a88['plugins']['get']('TrackChangesEditing');_0x2b0fdb['enableCommand']('link',(_0x488891,_0x37ac66)=>{const _0x3e8294=_0x591a88['model']['document']['selection'];let _0x322073=[];if(_0x3e8294['isCollapsed']){if(!_0x3e8294['hasAttribute']('linkHref'))return void _0x488891(_0x37ac66);{const _0x2163c4=_0x6c8a7b(_0x3e8294['getFirstPosition'](),'linkHref',_0x3e8294['getAttribute']('linkHref'),_0x591a88['model']);_0x322073=[_0x2163c4];}}else _0x322073=Array['from'](_0x3e8294['getRanges']());_0x591a88['model']['change'](()=>{for(const _0x46e900 of _0x322073)_0x2b0fdb['markInlineFormat'](_0x46e900,{'commandName':'link','commandParams':[_0x37ac66]});});}),_0x2b0fdb['enableCommand']('unlink',()=>{const _0x1a1628=this['editor']['model'],_0x19f21b=_0x1a1628['document']['selection'];_0x1a1628['change'](()=>{let _0x309be3=[];if(_0x19f21b['isCollapsed'])_0x309be3=[_0x6c8a7b(_0x19f21b['getFirstPosition'](),'linkHref',_0x19f21b['getAttribute']('linkHref'),_0x591a88['model'])];else _0x309be3=Rt('linkHref',_0x19f21b['getFirstRange'](),_0x591a88['model']);for(const _0x13edd7 of _0x309be3)_0x2b0fdb['markInlineFormat'](_0x13edd7,{'commandName':'unlink','commandParams':[]});});}),_0x2b0fdb['_descriptionFactory']['registerDescriptionCallback'](_0x49f92c=>{const {data:_0x2f30a7}=_0x49f92c,{t:t}=_0x591a88['locale'];if(_0x2f30a7){if('link'==_0x2f30a7['commandName'])return{'type':'format','content':t('*Set\x20link:*\x20%0','\x22'+_0x2f30a7['commandParams'][0x0]+'\x22')};return'unlink'==_0x2f30a7['commandName']?{'type':'format','content':t('*Remove\x20link*')}:void 0x0;}});}}
|
package/src/integrations/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5f30c6}from'ckeditor5/src/core';export default class V extends _0x5f30c6{['afterInit'](){const _0x3361e4=this['editor'];if(!_0x3361e4['plugins']['has']('ListEditing'))return;const _0x46fa8f=_0x3361e4['plugins']['get']('TrackChangesEditing'),_0x51ba07=_0x3361e4['plugins']['has']('TodoListEditing');function _0x3b462b(_0x974dcd){return()=>{const _0x2d3747=_0x3361e4['model']['document']['selection'],_0x221ffd=_0x3361e4['commands']['get'](_0x974dcd);if(_0x221ffd['value'])return void _0x3361e4['execute']('paragraph',{});const _0x370468=_0x974dcd['slice'](0x0,-0x4),_0x1babae=function(_0x850eab,_0x4c02b7,_0x1ebc94){let _0x39802a=Array['from'](_0x850eab)['filter'](_0x2779e5=>function(_0x3360e4,_0x58f3c7){return _0x58f3c7['checkChild'](_0x3360e4['parent'],'listItem')&&!_0x58f3c7['isObject'](_0x3360e4);}(_0x2779e5,_0x1ebc94));_0x39802a=_0x39802a['filter'](_0x5ced91=>!_0x5ced91['is']('element','listItem')||_0x5ced91['getAttribute']('listType')!=_0x4c02b7);const _0x4c377a=new Set();for(const _0x7d0b25 of _0x39802a)_0x7d0b25['is']('element','listItem')?_0x4c377a['add'](Mt(_0x7d0b25)):_0x4c377a['add'](_0x7d0b25);return Array['from'](_0x4c377a);}(_0x2d3747['getSelectedBlocks'](),_0x370468,_0x3361e4['model']['schema']);_0x3361e4['model']['change'](()=>{for(const _0x546d2e of _0x1babae)_0x46fa8f['markBlockFormat'](_0x546d2e,{'commandName':_0x974dcd,'commandParams':[{'forceValue':!_0x221ffd['value']}],'formatGroupId':'blockName'},Pt(_0x546d2e));});};}function _0x1bbbeb(_0x40b830){return()=>{const _0x4b9da2=function(_0x325d31){const _0x43d26f=(_0x325d31=Array['from'](_0x325d31))['findIndex'](_0x48db07=>'listItem'!=_0x48db07['name']);return _0x43d26f>-0x1&&(_0x325d31=_0x325d31['slice'](0x0,_0x43d26f)),_0x325d31;}(_0x3361e4['model']['document']['selection']['getSelectedBlocks']()),_0x47c8ae=_0x3361e4['model']['createRange'](_0x3361e4['model']['createPositionAt'](_0x4b9da2[0x0],'before'),_0x3361e4['model']['createPositionAt'](_0x4b9da2[_0x4b9da2['length']-0x1],'end'));_0x3361e4['model']['change'](()=>{_0x46fa8f['markBlockFormat'](_0x47c8ae,{'commandName':_0x40b830,'commandParams':[],'formatGroupId':'listIndent'},function(_0x1c9c45){const _0x3524d9=new Set();for(const _0x212013 of _0x1c9c45){let _0x3dc996=_0x212013['nextSibling'];for(;_0x3dc996&&_0x3dc996['getAttribute']('listIndent')>_0x212013['getAttribute']('listIndent');)_0x3524d9['add'](_0x3dc996),_0x3dc996=_0x3dc996['nextSibling'];}return Array['from'](_0x3524d9);}(_0x4b9da2));});};}_0x46fa8f['enableCommand']('numberedList',_0x3b462b('numberedList')),_0x46fa8f['enableCommand']('bulletedList',_0x3b462b('bulletedList')),_0x51ba07&&_0x46fa8f['enableCommand']('todoList',_0x3b462b('todoList')),_0x46fa8f['enableCommand']('indentList',_0x1bbbeb('indentList')),_0x46fa8f['enableCommand']('outdentList',_0x1bbbeb('outdentList')),_0x51ba07&&_0x46fa8f['enableCommand']('checkTodoList',()=>{const _0x260f39=_0x3361e4['commands']['get']('checkTodoList'),_0xa83e78=Array['from'](_0x260f39['_selectedElements']);_0xa83e78['filter'](_0x45e2e2=>_0x45e2e2['getAttribute']('todoListChecked')!=_0x260f39['value']),_0x3361e4['model']['change'](()=>{for(const _0x5ae383 of _0xa83e78)_0x46fa8f['markBlockFormat'](_0x5ae383,{'commandName':'checkTodoList','commandParams':[{'forceValue':!_0x260f39['value']}]});});});const {t:t}=_0x3361e4['locale'];_0x46fa8f['_descriptionFactory']['registerElementLabel']('listItem',_0x228c63=>t({'string':'list\x20item','plural':'%0\x20list\x20items','id':'ELEMENT_LIST_ITEM'},_0x228c63)),_0x46fa8f['_descriptionFactory']['registerDescriptionCallback'](_0x46fecb=>{const {data:_0x2d5ed4}=_0x46fecb;if(_0x2d5ed4){if('numberedList'==_0x2d5ed4['commandName']||'bulletedList'==_0x2d5ed4['commandName']||'todoList'==_0x2d5ed4['commandName'])switch(_0x2d5ed4['commandName']['replace']('List','')){case'bulleted':return _0x1972d9(t({'string':'bulleted\x20list','id':'ELEMENT_BULLETED_LIST'}));case'numbered':return _0x1972d9(t({'string':'numbered\x20list','id':'ELEMENT_NUMBERED_LIST'}));case'todo':return _0x1972d9(t({'string':'to-do\x20list','id':'ELEMENT_TODO_LIST'}));}if('indentList'==_0x2d5ed4['commandName'])return{'type':'format','content':t('*Indent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('outdentList'==_0x2d5ed4['commandName'])return{'type':'format','content':t('*Outdent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('checkTodoList'==_0x2d5ed4['commandName'])return _0x2d5ed4['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Check\x20item*')}:{'type':'format','content':t('*Uncheck\x20item*')};}function _0x1972d9(_0x16c490){return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x16c490)};}});}}function Mt(_0x525eaa){const _0x3271c3=_0x525eaa['getAttribute']('listIndent');if(0x0==_0x3271c3)return _0x525eaa;let _0x49ee55=_0x525eaa;for(;_0x525eaa['previousSibling']&&_0x525eaa['previousSibling']['is']('element','listItem');){const _0x1e2b54=_0x525eaa['previousSibling']['getAttribute']('listIndent');if(_0x1e2b54==_0x3271c3)_0x49ee55=_0x525eaa['previousSibling'];else{if(_0x1e2b54<_0x3271c3)break;}_0x525eaa=_0x525eaa['previousSibling'];}return _0x49ee55;}function Pt(_0x1749c6){const _0x535b08=[];if(_0x1749c6['is']('element','listItem')&&_0x1749c6['getAttribute']('listIndent')>0x0){let _0x5ecd41=_0x1749c6['nextSibling'];for(;_0x5ecd41&&'listItem'==_0x5ecd41['name']&&_0x5ecd41['getAttribute']('listIndent')==_0x1749c6['getAttribute']('listIndent');)_0x535b08['push'](_0x5ecd41),_0x5ecd41=_0x5ecd41['nextSibling'];}return _0x535b08;}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x274ae8}from'ckeditor5/src/core';export default class X extends _0x274ae8{['afterInit'](){const _0x31ffd2=this['editor'];if(!_0x31ffd2['plugins']['has']('MediaEmbedEditing'))return;const _0x53d0fa=_0x31ffd2['plugins']['get']('TrackChangesEditing'),{t:t}=_0x31ffd2['locale'];_0x53d0fa['enableCommand']('mediaEmbed'),_0x53d0fa['_descriptionFactory']['registerElementLabel']('media',_0x341882=>t({'string':'media\x20item','plural':'%0\x20media\x20items','id':'ELEMENT_MEDIA'},_0x341882)),_0x31ffd2['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x16544e,{writer:_0x189eae,options:_0x51fc43})=>{if(_0x51fc43['showSuggestionHighlights'])return _0x189eae['createEmptyElement']('div');},'converterPriority':'high'}),_0x31ffd2['data']['downcastDispatcher']['on']('attribute:url:media',(_0x42579f,_0x511bc0,_0x15e68a)=>{_0x15e68a['options']['showSuggestionHighlights']&&_0x42579f['stop']();},{'priority':'high'});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x63b9=['editor','afterInit','MentionEditing','TrackChangesEditing','plugins','has','mention','get'];(function(_0x1b69f6,_0x63b9b4){const _0x780540=function(_0x5baf97){while(--_0x5baf97){_0x1b69f6['push'](_0x1b69f6['shift']());}};_0x780540(++_0x63b9b4);}(_0x63b9,0xd7));const _0x7805=function(_0x1b69f6,_0x63b9b4){_0x1b69f6=_0x1b69f6-0x0;let _0x780540=_0x63b9[_0x1b69f6];return _0x780540;};import{Plugin as _0x414e44}from'ckeditor5/src/core';export default class Y extends _0x414e44{[_0x7805('0x2')](){const _0x16826c=this[_0x7805('0x1')];_0x16826c[_0x7805('0x5')][_0x7805('0x6')](_0x7805('0x3'))&&_0x16826c[_0x7805('0x5')][_0x7805('0x0')](_0x7805('0x4'))['enableCommand'](_0x7805('0x7'));}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1ae752}from'ckeditor5/src/core';export default class Z extends _0x1ae752{['afterInit'](){const _0x2a945d=this['editor'];if(!_0x2a945d['plugins']['has']('PageBreakEditing'))return;_0x2a945d['plugins']['get']('TrackChangesEditing')['enableCommand']('pageBreak');const _0x51bb2f=_0x2a945d['plugins']['get']('TrackChangesEditing'),{t:t}=_0x2a945d['locale'];_0x51bb2f['_descriptionFactory']['registerElementLabel']('pageBreak',_0x4a7e1f=>t({'string':'page\x20break','plural':'%0\x20page\x20breaks','id':'ELEMENT_PAGE_BREAK'},_0x4a7e1f));}}
|