@ckeditor/ckeditor5-track-changes 31.0.0 → 33.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 +2 -2
- package/build/track-changes.js +5 -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/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 +8 -7
- package/lang/translations/cs.po +28 -24
- package/lang/translations/da.po +387 -0
- package/lang/translations/de.po +28 -24
- package/lang/translations/el.po +387 -0
- package/lang/translations/en-au.po +28 -24
- package/lang/translations/en.po +28 -24
- package/lang/translations/es.po +62 -58
- package/lang/translations/et.po +27 -23
- package/lang/translations/fr.po +28 -24
- package/lang/translations/gl.po +28 -24
- package/lang/translations/hi.po +28 -24
- package/lang/translations/hr.po +28 -24
- package/lang/translations/it.po +28 -24
- package/lang/translations/nl.po +27 -23
- package/lang/translations/pl.po +28 -24
- package/lang/translations/pt-br.po +50 -46
- package/lang/translations/sk.po +28 -24
- package/lang/translations/sr-latn.po +28 -24
- package/lang/translations/sr.po +28 -24
- package/lang/translations/tk.po +28 -24
- package/lang/translations/tr.po +28 -24
- package/lang/translations/zh-cn.po +28 -24
- package/lang/translations/zh.po +370 -0
- 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/suggestion.css +10 -0
- package/theme/suggestionmarker.css +1 -1
|
@@ -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 _0x29bed9}from'ckeditor5/src/core';import{TreeWalker as Qt}from'ckeditor5/src/engine';export default class x extends _0x29bed9{['afterInit'](){const _0x3cad1e=this['editor'],{t:t}=_0x3cad1e['locale'];if(!_0x3cad1e['plugins']['has']('BlockQuoteEditing'))return;const _0x35bf66=_0x3cad1e['plugins']['get']('TrackChangesEditing'),_0x3ef524=this['editor']['commands']['get']('blockQuote');_0x35bf66['enableCommand']('blockQuote',(_0x294c90,_0x154ef2={})=>{const _0xd0731a=this['editor']['model']['document']['selection'],_0x224354=_0x154ef2&&void 0x0!==_0x154ef2['forceValue']?_0x154ef2['forceValue']:!_0x3ef524['value'];let _0x151b87=[];if(_0x224354){const _0x1116d9=Array['from'](_0xd0731a['getSelectedBlocks']())['filter'](_0x47fa7b=>Bt(_0x47fa7b)||function(_0x583422,_0x20dca7){const _0x162f36=_0x20dca7['checkChild'](_0x583422['parent'],'blockQuote'),_0x35bc4f=_0x20dca7['checkChild'](['$root','blockQuote'],_0x583422);return _0x162f36&&_0x35bc4f;}(_0x47fa7b,this['editor']['model']['schema']));_0x151b87=Lt(_0x1116d9,_0x3cad1e['model']);}else{const _0x3b89d4=Array['from'](_0xd0731a['getSelectedBlocks']())['filter'](_0x1ba52a=>Bt(_0x1ba52a));_0x151b87=Lt(_0x3b89d4,_0x3cad1e['model']);}_0x3cad1e['model']['change'](()=>{for(const _0x13f343 of _0x151b87)_0x35bf66['markBlockFormat'](_0x13f343,{'commandName':'blockQuote','commandParams':[{'forceValue':_0x224354}]});});}),_0x35bf66['_descriptionFactory']['registerDescriptionCallback'](_0x55b8d5=>{const {data:_0xa2cd1f}=_0x55b8d5;if(_0xa2cd1f&&'blockQuote'==_0xa2cd1f['commandName']){const _0x514a91=t({'string':'block\x20quote','id':'ELEMENT_BLOCK_QUOTE'});return _0xa2cd1f['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Format:*\x20%0',_0x514a91)}:{'type':'format','content':t('*Remove\x20format:*\x20%0',_0x514a91)};}});}}function Bt(_0x54d626){return'blockQuote'==_0x54d626['parent']['name'];}function Lt(_0x282a0b,_0x378c85){let _0x1becb3,_0x509885=0x0;const _0xe23400=[],_0x5050d0=_0x378c85['schema'];for(;_0x509885<_0x282a0b['length'];){const _0x1e1015=_0x282a0b[_0x509885],_0x505ac1=_0x282a0b[_0x509885+0x1];_0x1becb3||(_0x1becb3=_0x378c85['createPositionBefore'](_0x1e1015)),_t(_0x378c85,_0x1e1015,_0x505ac1)||(_0xe23400['push'](_0x378c85['createRange'](_0x1becb3,_0x5050d0['isObject'](_0x1e1015)?_0x378c85['createPositionAfter'](_0x1e1015):_0x378c85['createPositionAt'](_0x1e1015,'end'))),_0x1becb3=null),_0x509885++;}return _0xe23400;}function _t(_0x31894d,_0x48925e,_0x83c14d){if(!_0x83c14d)return!0x1;const _0x445ff0=_0x31894d['createPositionAfter'](_0x48925e),_0x3696d1=_0x31894d['createPositionBefore'](_0x83c14d),_0x263b4f=new Qt({'boundaries':_0x31894d['createRange'](_0x445ff0,_0x3696d1)});for(const _0x407d15 of _0x263b4f)if('text'==_0x407d15['type']||_0x31894d['schema']['isLimit'](_0x407d15['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 _0x2f12c8}from'ckeditor5/src/core';export default class O extends _0x2f12c8{['afterInit'](){const _0x19f6bb=this['editor'],{t:t}=_0x19f6bb['locale'];if(!_0x19f6bb['plugins']['has']('CodeBlock'))return;_0x19f6bb['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerElementLabel']('codeBlock',_0x4a06d5=>t({'string':'code\x20block','plural':'%0\x20code\x20blocks','id':'ELEMENT_CODE_BLOCK'},_0x4a06d5));}}
|
|
@@ -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 _0x16cd=['enableCommand','get','requires','addCommentThread','editor','init','TrackChangesEditing'];(function(_0x119371,_0x16cd1c){var _0x389455=function(_0x3a44d3){while(--_0x3a44d3){_0x119371['push'](_0x119371['shift']());}};_0x389455(++_0x16cd1c);}(_0x16cd,0xad));var _0x3894=function(_0x119371,_0x16cd1c){_0x119371=_0x119371-0x0;var _0x389455=_0x16cd[_0x119371];return _0x389455;};import{Plugin as _0x297c8c}from'ckeditor5/src/core';export default class P extends _0x297c8c{static get[_0x3894('0x4')](){return['CommentsEditing'];}[_0x3894('0x0')](){this[_0x3894('0x6')]['plugins'][_0x3894('0x3')](_0x3894('0x1'))[_0x3894('0x2')](_0x3894('0x5'));}}
|
|
@@ -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 _0x2c6a=['unbindElementFromMarkerName','markerName','downcastDispatcher','requires','lock','buffer','init','plugins','editing','rootName','writer','forward','createRange','batch','end','high','fromRange','start','detach','addMarker:suggestion:deletion','showSuggestionHighlights','unit','editor','getFirstRange','isCollapsed','selection','mapper','document','remove','merge','root','removeMarker:suggestion:deletion','unlock','enableCommand','setSelection','get','$graveyard','deleteForward','data','modifySelection','createSelection','model','uiElement','markerNameToElements','enqueueChange','options'];(function(_0x16db12,_0x2c6a51){const _0x5822ba=function(_0x259161){while(--_0x259161){_0x16db12['push'](_0x16db12['shift']());}};_0x5822ba(++_0x2c6a51);}(_0x2c6a,0xc4));const _0x5822=function(_0x16db12,_0x2c6a51){_0x16db12=_0x16db12-0x0;let _0x5822ba=_0x2c6a[_0x16db12];return _0x5822ba;};import{Plugin as _0x37dc66}from'ckeditor5/src/core';import{Delete as _0x2702b5}from'ckeditor5/src/typing';import{LiveRange as _0x86030c}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x407845}from'./utils';export default class G extends _0x37dc66{static get[_0x5822('0x25')](){return[_0x2702b5];}[_0x5822('0x28')](){const _0x26468b=this[_0x5822('0xa')],_0x2b5293=_0x26468b[_0x5822('0x29')][_0x5822('0x17')]('TrackChangesEditing');_0x2b5293[_0x5822('0x15')]('delete');const _0x574211=_0x26468b['commands'][_0x5822('0x17')](_0x5822('0x19'));_0x2b5293['enableCommand'](_0x5822('0x19'),(_0x44f063,_0x5aac0b={})=>{const _0xef97a2=_0x26468b[_0x5822('0x1d')][_0x5822('0x1c')](_0x26468b['model'][_0x5822('0xf')][_0x5822('0xd')]);_0xef97a2[_0x5822('0xc')]&&_0x26468b['model'][_0x5822('0x1b')](_0xef97a2,{'direction':_0x5822('0x2d'),'unit':_0x5aac0b[_0x5822('0x9')]});const _0x4b65e8=_0xef97a2[_0x5822('0xb')](),_0x4d5b6c=_0x86030c[_0x5822('0x4')](_0x4b65e8);let _0x432e11;_0x44f063(_0x5aac0b),_0x432e11=_0x5822('0x18')==_0x4d5b6c[_0x5822('0x12')][_0x5822('0x2b')]?_0x26468b[_0x5822('0x1d')][_0x5822('0x0')](_0x4b65e8['start']):_0x26468b['model'][_0x5822('0x0')](_0x4d5b6c[_0x5822('0x5')],_0x4d5b6c[_0x5822('0x2')]),_0x4d5b6c[_0x5822('0x6')](),_0x26468b[_0x5822('0x1d')][_0x5822('0x20')](_0x574211['buffer'][_0x5822('0x1')],_0x16c979=>{_0x574211[_0x5822('0x27')][_0x5822('0x26')](),_0x16c979[_0x5822('0x16')](_0x16c979['createRange'](_0x432e11[_0x5822('0x2')])),_0x574211['buffer'][_0x5822('0x14')]();});}),_0x26468b[_0x5822('0x2a')][_0x5822('0x24')]['on'](_0x5822('0x7'),_0x407845(_0x26468b,_0x5822('0x11')),{'priority':_0x5822('0x3')}),_0x26468b[_0x5822('0x1a')][_0x5822('0x24')]['on'](_0x5822('0x7'),(_0x3db04d,_0x19b978,_0x1dab84)=>{_0x1dab84[_0x5822('0x21')][_0x5822('0x8')]&&_0x407845(_0x26468b,_0x5822('0x11'),{'showActiveMarker':!0x1})(_0x3db04d,_0x19b978,_0x1dab84);},{'priority':'high'}),_0x26468b[_0x5822('0x2a')][_0x5822('0x24')]['on'](_0x5822('0x13'),(_0x27eaf5,_0x20cad6,_0x23844c)=>{const _0x50f598=_0x23844c[_0x5822('0xe')][_0x5822('0x1f')](_0x20cad6[_0x5822('0x23')]);if(_0x50f598)for(const _0x5ce137 of _0x50f598)_0x5ce137['is'](_0x5822('0x1e'))&&(_0x23844c['mapper'][_0x5822('0x22')](_0x5ce137,_0x20cad6[_0x5822('0x23')]),_0x23844c[_0x5822('0x2c')][_0x5822('0x10')](_0x5ce137));},{'priority':_0x5822('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 _0x3554=['selection','split','ck-suggestion-marker-split','downcastDispatcher','schema','options','parent','get','model','enter','setSelection','editing','fromRange','high','detach','showSuggestionHighlights','unbindElementFromMarkerName','end','plugins','isAtEnd','isLimit','addMarker:suggestion:insertion','getFirstRange','createRange','mapper','start','enableCommand','TrackChangesEditing','requires','hasClass','change','markInsertion'];(function(_0x4a5db0,_0x355420){const _0x4bda24=function(_0xcc189){while(--_0xcc189){_0x4a5db0['push'](_0x4a5db0['shift']());}};_0x4bda24(++_0x355420);}(_0x3554,0x19c));const _0x4bda=function(_0x4a5db0,_0x355420){_0x4a5db0=_0x4a5db0-0x0;let _0x4bda24=_0x3554[_0x4a5db0];return _0x4bda24;};import{Plugin as _0x785d7b}from'ckeditor5/src/core';import{Enter as _0x5382f5}from'ckeditor5/src/enter';import{LiveRange as _0x1dd51f}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x45a3f6}from'./utils';export default class F extends _0x785d7b{static get[_0x4bda('0x0')](){return[_0x5382f5];}['init'](){const _0x59d38c=this['editor'],_0x1e0647=_0x59d38c[_0x4bda('0x16')][_0x4bda('0xb')](_0x4bda('0x1f'));_0x1e0647[_0x4bda('0x1e')](_0x4bda('0xd'),_0x59a507=>{_0x59d38c[_0x4bda('0xc')][_0x4bda('0x2')](_0x441a6b=>{const _0x5f1df6=_0x59d38c[_0x4bda('0xc')]['document'][_0x4bda('0x4')],_0x1ef926=_0x5f1df6['getFirstPosition'](),_0x1e012f=_0x5f1df6['isCollapsed'],_0x41beed=_0x1dd51f[_0x4bda('0x10')](_0x5f1df6[_0x4bda('0x1a')]()),_0x57056c=_0x41beed['start'][_0x4bda('0xa')],_0x4583b0=_0x41beed['end'][_0x4bda('0xa')],_0x27b533=!(_0x41beed[_0x4bda('0x1d')]['isAtStart']&&_0x41beed[_0x4bda('0x15')][_0x4bda('0x17')]),_0x2f6f02=_0x57056c==_0x4583b0,_0x22b428=!(_0x59d38c[_0x4bda('0xc')][_0x4bda('0x8')]['isLimit'](_0x57056c)||_0x59d38c[_0x4bda('0xc')][_0x4bda('0x8')][_0x4bda('0x18')](_0x4583b0))&&(_0x1e012f||_0x27b533&&_0x2f6f02);if(_0x59a507(),_0x22b428){const _0x5aba44=_0x59d38c[_0x4bda('0xc')]['createPositionAt'](_0x1ef926['parent']['nextSibling'],0x0),_0x29b8e7=_0x441a6b['createRange'](_0x1ef926,_0x5aba44);_0x1e0647[_0x4bda('0x3')](_0x29b8e7);}else _0x441a6b[_0x4bda('0xe')](_0x441a6b[_0x4bda('0x1b')](_0x41beed[_0x4bda('0x15')]));_0x41beed[_0x4bda('0x12')]();});}),_0x59d38c[_0x4bda('0xf')][_0x4bda('0x7')]['on'](_0x4bda('0x19'),_0x45a3f6(_0x59d38c,_0x4bda('0x5')),{'priority':_0x4bda('0x11')}),_0x59d38c[_0x4bda('0xf')][_0x4bda('0x7')]['on']('removeMarker:suggestion:insertion',(_0x442245,_0x41fae0,_0x2a0900)=>{const _0x5a0709=_0x2a0900['mapper']['markerNameToElements'](_0x41fae0['markerName']);if(_0x5a0709)for(const _0xec8a06 of _0x5a0709)_0xec8a06[_0x4bda('0x1')](_0x4bda('0x6'))&&(_0x2a0900[_0x4bda('0x1c')][_0x4bda('0x14')](_0xec8a06,_0x41fae0['markerName']),_0x2a0900['writer']['remove'](_0xec8a06));},{'priority':_0x4bda('0x11')}),_0x59d38c['data'][_0x4bda('0x7')]['on']('addMarker:suggestion:insertion',(_0x3c1d1b,_0x190f13,_0x36cd5f)=>{_0x36cd5f[_0x4bda('0x9')][_0x4bda('0x13')]&&_0x45a3f6(_0x59d38c,_0x4bda('0x5'),{'showActiveMarker':!0x1})(_0x3c1d1b,_0x190f13,_0x36cd5f);},{'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 _0x4acc9c}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 _0x4acc9c{['afterInit'](){const {t:t}=this['editor']['locale'];for(const {pluginName:_0x2e3a7f,commandName:_0x193ae6}of zt)this['editor']['plugins']['has'](_0x2e3a7f)&&this['_enableCommand'](_0x193ae6);this['editor']['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerDescriptionCallback'](_0x2f0f75=>{const {data:_0xc2f796}=_0x2f0f75;if(null!=_0xc2f796){if('fontSize'==_0xc2f796['commandName']){const _0x3d492b=_0xc2f796['commandParams'][0x0]['value'];if(_0x3d492b){const _0x297b22=this['editor']['plugins']['get']('FontSize')['normalizeSizeOptions'](this['editor']['config']['get']('fontSize.options'))['find'](_0x3071cd=>_0x3071cd['model']==_0x3d492b)['title'],_0x4571ef=this['editor']['locale']['_t'](_0x297b22)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20size:*\x20%0',_0x4571ef)};}return{'type':'format','content':t('*Reset\x20font\x20size*')};}if('fontFamily'==_0xc2f796['commandName']){const _0x154566=_0xc2f796['commandParams'][0x0]['value'];return _0x154566?{'type':'format','content':t('*Set\x20font\x20family:*\x20%0',_0x154566)}:{'type':'format','content':t('*Reset\x20font\x20family*')};}if('fontColor'==_0xc2f796['commandName']){const _0x5e2be8=_0xc2f796['commandParams'][0x0]['value'];if(_0x5e2be8){const _0x4e4094=Ft(this['editor']['config']['get']('fontColor.colors'))['find'](_0x2af9aa=>_0x2af9aa['model']==_0x5e2be8);let _0x58f650=_0x5e2be8,_0x3576a7='';return _0x4e4094&&(_0x58f650=_0x4e4094['label'],_0x3576a7=this['editor']['locale']['_t'](_0x58f650)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20color:*\x20%0',_0x3576a7)['trim'](),'color':{'value':_0x5e2be8,'title':_0x3576a7||_0x58f650}};}return{'type':'format','content':t('*Reset\x20font\x20color*')};}if('fontBackgroundColor'==_0xc2f796['commandName']){const _0x386ed0=_0xc2f796['commandParams'][0x0]['value'];if(_0x386ed0){const _0x56b041=Ft(this['editor']['config']['get']('fontBackgroundColor.colors'))['find'](_0x308430=>_0x308430['model']==_0x386ed0);let _0x2cde2f=_0x386ed0,_0x255039='';return _0x56b041&&(_0x2cde2f=_0x56b041['label'],_0x255039=this['editor']['locale']['_t'](_0x2cde2f)['toLowerCase']()),{'type':'format','content':t('*Set\x20font\x20background\x20color:*\x20%0',_0x255039)['trim'](),'color':{'value':_0x386ed0,'title':_0x255039||_0x2cde2f}};}return{'type':'format','content':t('*Reset\x20font\x20background\x20color*')};}}});}['_enableCommand'](_0xa63dc7){const _0x5abb14=this['editor'];_0x5abb14['plugins']['get']('TrackChangesEditing')['enableCommand'](_0xa63dc7,(_0x8efe5c,_0x477ae4={})=>{const _0x168d92=_0x5abb14['model']['document']['selection'],_0x385893=_0x477ae4['value'];_0x168d92['isCollapsed']?_0x8efe5c(_0x477ae4):_0x5abb14['model']['change'](()=>{const _0x47cbd5=Array['from'](_0x168d92['getRanges']());for(const _0x197711 of _0x47cbd5){const _0x462280=_0x385893?[_0x197711]:Rt(_0xa63dc7,_0x197711,_0x5abb14['model']);for(const _0x33c9bd of _0x462280)_0x5abb14['plugins']['get']('TrackChangesEditing')['markInlineFormat'](_0x33c9bd,{'commandName':_0xa63dc7,'commandParams':[{'value':_0x385893}]});}});});}}
|
|
@@ -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 _0x38a874}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0x17cba7}from'./utils';export default class q extends _0x38a874{['afterInit'](){const _0x1d5b92=this['editor'],{t:t}=_0x1d5b92['locale'],_0x427c0c=_0x1d5b92['config']['get']('heading.options');if(!_0x1d5b92['plugins']['has']('HeadingEditing'))return;const _0x58446f=_0x1d5b92['plugins']['get']('TrackChangesEditing');_0x58446f['enableCommand']('heading',(_0x1bdcc9,_0x21f914)=>{const _0x2dc4a9=_0x21f914['value'],_0x50e960=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x5e464e=>function(_0x444808,_0x50af5f,_0x3b0611){return _0x3b0611['checkChild'](_0x444808['parent'],_0x50af5f)&&!_0x3b0611['isObject'](_0x444808)&&_0x444808['name']!=_0x50af5f;}(_0x5e464e,_0x2dc4a9,this['editor']['model']['schema']));_0x1d5b92['model']['change'](()=>{for(const _0xb6b2df of _0x50e960)_0x58446f['markBlockFormat'](_0xb6b2df,{'commandName':'heading','commandParams':[_0x21f914],'formatGroupId':'blockName'},_0x17cba7(_0xb6b2df));});});for(const _0x445071 of _0x427c0c)'paragraph'!=_0x445071['model']&&_0x58446f['_descriptionFactory']['registerElementLabel'](_0x445071['model'],_0x1c5115=>{const _0x239a2d=tn(_0x445071['model']);return null!==_0x239a2d?_0xe6ad16(_0x1c5115,_0x239a2d):_0x4ec8ad(_0x1c5115,_0x445071['title']);});function _0xe6ad16(_0x244251,_0x5c77e5){return t({'string':'heading\x20(level\x20%1)','plural':'%0\x20headings\x20(level\x20%1)','id':'ELEMENT_HEADING'},[_0x244251,_0x5c77e5]);}function _0x4ec8ad(_0x57aeab,_0x399438){return t({'string':'heading\x20(%1)','plural':'%0\x20headings\x20(%1)','id':'ELEMENT_HEADING_CUSTOM'},[_0x57aeab,_0x399438]);}_0x58446f['_descriptionFactory']['registerDescriptionCallback'](_0xb63021=>{const {type:_0x1c731d,data:_0x2510ab}=_0xb63021;if('formatBlock'==_0x1c731d&&_0x2510ab&&'heading'==_0x2510ab['commandName']){const _0x16d8f4=_0x2510ab['commandParams'][0x0]['value'],_0x249261=tn(_0x16d8f4);if(null!==_0x249261)return{'type':'format','content':t('*Change\x20to:*\x20%0',_0xe6ad16(0x1,_0x249261))};const _0x616294=_0x427c0c['find'](_0x4db1ab=>_0x4db1ab['model']===_0x16d8f4)['title'];return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x4ec8ad(0x1,_0x616294))};}});}}function tn(_0x37009b){const _0x2c1c38=_0x37009b['match'](/^heading(\d+)$/);return _0x2c1c38?_0x2c1c38[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 _0x421eac}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class H extends _0x421eac{['afterInit'](){const _0x203950=this['editor'];if(!_0x203950['plugins']['has']('HighlightEditing'))return;const _0x478325=_0x203950['plugins']['get']('TrackChangesEditing');_0x478325['enableCommand']('highlight',(_0x46348a,_0x46d609={})=>{const _0x4c9a9b=_0x203950['model']['document']['selection'],_0x5b2938=_0x4c9a9b['getAttribute']('highlight');let _0x4b6b05=_0x46d609['value'],_0x49163f=[];if(_0x4c9a9b['isCollapsed']){const _0x30c00e=_0x4c9a9b['getFirstPosition']();if(!_0x4c9a9b['hasAttribute']('highlight'))return void _0x46348a(_0x46d609);{const _0x2af1ad=_0x2c6dd2=>_0x2c6dd2['item']['getAttribute']('highlight')===_0x5b2938,_0x17b687=_0x30c00e['getLastMatchingPosition'](_0x2af1ad,{'direction':'backward'}),_0x4084f2=_0x30c00e['getLastMatchingPosition'](_0x2af1ad);_0x49163f=[_0x203950['model']['createRange'](_0x17b687,_0x4084f2)],_0x4b6b05==_0x5b2938&&(_0x4b6b05=null);}}else for(const _0x3cba3f of _0x4c9a9b['getRanges']())_0x4b6b05?_0x49163f['push'](_0x3cba3f):_0x49163f['push'](...Rt('highlight',_0x3cba3f,_0x203950['model']));_0x203950['model']['change'](()=>{for(const _0x320879 of _0x49163f)_0x478325['markInlineFormat'](_0x320879,{'commandName':'highlight','commandParams':[{'value':_0x4b6b05}]});});});const {t:t}=_0x203950['locale'];_0x478325['_descriptionFactory']['registerDescriptionCallback'](_0x4c3615=>{const {type:_0x2b3c57,data:_0x38d2d5}=_0x4c3615;if('formatInline'==_0x2b3c57&&_0x38d2d5&&'highlight'==_0x38d2d5['commandName']){const _0x4fe370=_0x38d2d5['commandParams'][0x0]['value'];if(_0x4fe370){const _0x579d0a=_0x203950['config']['get']('highlight.options')['find'](_0x140828=>_0x140828['model']==_0x4fe370),_0x2bc1cc=_0x203950['locale']['_t'](_0x579d0a['title'])['toLowerCase']();return{'type':'format','content':t('*Set\x20highlight:*\x20%0',_0x2bc1cc),'color':{'value':_0x579d0a['color'],'title':_0x579d0a['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 _0x310bac}from'ckeditor5/src/core';import'../../theme/integrations/horizontalline.css';export default class W extends _0x310bac{['afterInit'](){const _0x50f4ad=this['editor'];if(!_0x50f4ad['plugins']['has']('HorizontalLineEditing'))return;_0x50f4ad['plugins']['get']('TrackChangesEditing')['enableCommand']('horizontalLine');const _0x4f12d1=_0x50f4ad['plugins']['get']('TrackChangesEditing'),{t:t}=_0x50f4ad['locale'];_0x4f12d1['_descriptionFactory']['registerElementLabel']('horizontalLine',_0x32ec5c=>t({'string':'horizontal\x20line','plural':'%0\x20horizontal\x20lines','id':'ELEMENT_HORIZONTAL_LINE'},_0x32ec5c)),_0x50f4ad['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x521bed,{writer:_0x383c74,options:_0x1c7e3e})=>{if(!_0x1c7e3e['showSuggestionHighlights'])return;const _0x137871=_0x383c74['createContainerElement']('div'),_0x1186aa=_0x383c74['createEmptyElement']('hr');return _0x383c74['addClass']('ck-horizontal-line',_0x137871),_0x383c74['insert'](_0x383c74['createPositionAt'](_0x137871,0x0),_0x1186aa),_0x137871;},'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 _0x5a6e1c}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x45e4ea}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x10e8e5}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class V extends _0x5a6e1c{['afterInit'](){const _0x3da5f5=this['editor'];if(!_0x3da5f5['plugins']['has']('ImageEditing'))return;const _0x856082=_0x3da5f5['plugins']['get']('TrackChangesEditing'),_0x506465=_0x3da5f5['plugins']['get']('ImageUtils'),_0x526b4e={},{t:t}=_0x3da5f5['locale'];if(_0x856082['enableCommand']('insertImage'),_0x856082['_descriptionFactory']['registerElementLabel']('imageBlock',_0x427c19=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x427c19)),_0x856082['_descriptionFactory']['registerElementLabel']('imageInline',_0x4615a8=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x4615a8)),_0x856082['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x3da5f5['plugins']['has']('ImageUploadEditing')&&_0x856082['enableCommand']('uploadImage'),_0x3da5f5['plugins']['has']('ImageBlockEditing')&&_0x3da5f5['plugins']['has']('ImageInlineEditing')&&(_0x856082['enableCommand']('imageTypeInline',(_0x4c5fbd,_0x1ab7f5)=>{const _0x1b5355=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0x1b5355,{'commandName':'imageTypeInline','commandParams':[_0x1ab7f5]},[],'convertBlockImageToInline');});}),_0x856082['enableCommand']('imageTypeBlock',(_0x3b2c75,_0x3049b0)=>{_0x3da5f5['model']['change'](_0x2a2ddc=>{let _0x1c3b28=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x48db9a=_0x2a2ddc['createRangeOn'](_0x1c3b28);const _0x453d6f=te['fromPosition'](_0x48db9a['start'],'toPrevious'),_0x10d7cf=te['fromPosition'](_0x48db9a['end'],'toNext');_0x856082['forceDefaultExecution'](()=>_0x3b2c75(_0x3049b0)),_0x1c3b28=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x48db9a=_0x2a2ddc['createRangeOn'](_0x1c3b28);const _0x2a05e0=_0x2a2ddc['createRange'](_0x453d6f,_0x10d7cf);_0x453d6f['detach'](),_0x10d7cf['detach'](),_0x856082['markBlockFormat'](_0x1c3b28,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x2a05e0['start']['isBefore'](_0x48db9a['start'])&&_0x856082['markInsertion'](_0x2a2ddc['createRange'](_0x2a05e0['start'],_0x48db9a['start']),'convertInlineImageToBlock'),_0x48db9a['end']['isBefore'](_0x2a05e0['end'])&&_0x856082['markInsertion'](_0x2a2ddc['createRange'](_0x48db9a['end'],_0x2a05e0['end']),'convertInlineImageToBlock');});}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x856082['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x452037])=>{const _0x29f825=_0x856082['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x251867=_0x452037['start'],_0x5be7a7=_0x452037['end'];const _0x1dbbc7=_0x3da5f5['model']['schema']['getNearestSelectionRange'](_0x251867,'backward'),_0xd4fb41=_0x3da5f5['model']['schema']['getNearestSelectionRange'](_0x5be7a7,'forward');_0x1dbbc7['isCollapsed']&&(_0x251867=_0x1dbbc7['start']),_0xd4fb41['isCollapsed']&&(_0x5be7a7=_0xd4fb41['end']),_0x29f825([_0x3da5f5['model']['createRange'](_0x251867,_0x5be7a7)]);}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0xe4429c),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0xe4429c)),_0x3da5f5['plugins']['has']('ImageCaptionEditing')&&(_0x856082['enableCommand']('toggleImageCaption',(_0x50fc81,_0x4e057d)=>{let _0x537d11=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x5d2a25=_0x10e8e5(_0x537d11);_0x3da5f5['model']['change'](()=>{if(_0x5d2a25)return void _0x856082['markDeletion'](_0x3da5f5['model']['createRangeOn'](_0x5d2a25));const _0x4ee2b5=_0x506465['isBlockImage'](_0x537d11);_0x50fc81(_0x4e057d),_0x537d11=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0x5d2a25=_0x10e8e5(_0x537d11),_0x856082['markInsertion'](_0x3da5f5['model']['createRangeOn'](_0x5d2a25),_0x4ee2b5?null:'imageCaption');});}),_0x856082['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0xe4429c)),_0x3da5f5['plugins']['has']('ImageStyleEditing')){_0x856082['enableCommand']('imageStyle',(_0x402ef3,_0x1ba28e)=>{const _0xfd219f=_0x3da5f5['plugins']['get']('Users')['me'],_0x29ef96=_0x3da5f5['commands']['get']('imageStyle');let _0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0xb89ee9=_0x3da5f5['model']['createRangeOn'](_0x2f446e),_0x1e6ae2=_0x29ef96['value'];if(_0x1e6ae2==_0x1ba28e['value'])return;const _0x348a45={'commandName':'imageStyle','commandParams':[_0x1ba28e],'formatGroupId':_0x45e4ea()};_0x3da5f5['model']['change'](()=>{if(_0x856082['getSuggestions']()['filter'](_0x2618d2=>_0x2618d2['isInContent']&&_0xfd219f==_0x2618d2['author']&&('formatBlock'==_0x2618d2['type']||'formatInline'==_0x2618d2['type'])&&('imageStylePreApply'==_0x2618d2['subType']||'imageStylePostApply'==_0x2618d2['subType'])&&_0x2618d2['getFirstRange']()['isEqual'](_0xb89ee9))['forEach'](_0x1ab402=>_0x856082['discardSuggestion'](_0x1ab402['head'])),_0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),_0xb89ee9=_0x3da5f5['model']['createRangeOn'](_0x2f446e),_0x29ef96['refresh'](),_0x3da5f5['commands']['get']('imageTypeInline')['refresh'](),_0x3da5f5['commands']['get']('imageTypeBlock')['refresh'](),_0x1e6ae2=_0x29ef96['value'],_0x1e6ae2!=_0x1ba28e['value'])return _0x506465['isInlineImage'](_0x2f446e)&&_0x29ef96['shouldConvertImageType'](_0x1ba28e['value'],_0x2f446e)?(_0x402ef3(_0x1ba28e),_0x2f446e=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']),void _0x856082['markBlockFormat'](_0x2f446e,{..._0x348a45,'commandReversedParams':[{'value':_0x1e6ae2||null}]},[],'imageStylePreApply')):void(_0x506465['isBlockImage'](_0x2f446e)?_0x856082['markBlockFormat'](_0x2f446e,_0x348a45,[],'imageStylePostApply'):_0x856082['markInlineFormat'](_0xb89ee9,_0x348a45,'imageStylePostApply'));});});for(const _0x490141 of _0x3da5f5['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x526b4e[_0x490141['name']]=_0x490141['title']['toLowerCase']();_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x4b2596,_0x468f27)=>{_0x856082['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x4b2596,{'commandName':_0x468f27['commandName'],'commandParams':_0x468f27['commandReversedParams']});}),_0x856082['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0xe4429c);}const _0x2d7aeb=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x16cc81(_0xed3e9a,_0x2ab086){const _0x49f753=_0x2d7aeb['findIndex'](({type:_0x4c51e7,subType:_0x3b3b71})=>_0xed3e9a['type']==_0x4c51e7&&_0xed3e9a['subType']==_0x3b3b71),_0x5eb2f5=_0x2d7aeb['findIndex'](({type:_0x36a557,subType:_0x57f699})=>_0x2ab086['type']==_0x36a557&&_0x2ab086['subType']==_0x57f699);if(_0x49f753<0x0||_0x5eb2f5<0x0)return!0x1;const _0x22eed7=_0xed3e9a['getFirstRange'](),_0xab5490=_0x2ab086['getFirstRange']();if((0x0==_0x49f753||0x1==_0x49f753)&&0x2==_0x5eb2f5&&_0x22eed7['isIntersecting'](_0xab5490))return!0x0;if(0x2==_0x49f753&&0x3==_0x5eb2f5){const _0x3c7709=_0x856082['_findSuggestions'](_0x22eed7,'insertion')['filter'](({suggestion:_0x246380,meta:_0x560a43})=>_0x560a43['isOwn']&&'convertInlineImageToBlock'==_0x246380['subType']);if(_0x3c7709['length']>0x1&&_0xab5490['end']['isEqual'](_0x22eed7['start']))return!0x0;if(0x1==_0x3c7709['length']&&(_0x22eed7['start']['isEqual'](_0xab5490['end'])||_0x22eed7['end']['isEqual'](_0xab5490['start'])))return!0x0;}if(0x3==_0x49f753&&0x3==_0x5eb2f5&&_0x22eed7['start']['isBefore'](_0xab5490['start'])){const _0x18365f=_0x22eed7['end']['nodeAfter'],_0xd13171=_0xab5490['start']['nodeBefore'];return _0x506465['isBlockImage'](_0x18365f)&&_0x18365f===_0xd13171;}return!0x1;}function _0xe4429c(_0x506789,_0x21a46b){return _0x16cc81(_0x506789,_0x21a46b)?[_0x506789,_0x21a46b]:_0x16cc81(_0x21a46b,_0x506789)?[_0x21a46b,_0x506789]:null;}_0x3da5f5['model']['document']['registerPostFixer'](()=>{let _0x1db3a5=!0x1;const _0x305068=Array['from'](_0x3da5f5['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x331f85,data:_0x184536}of _0x305068){const {group:_0x45b123,type:_0x502eaf,subType:_0x2bfbad,id:_0x5ea53c}=_0x856082['_splitMarkerName'](_0x331f85);if('suggestion'==_0x45b123&&_0x856082['hasSuggestion'](_0x5ea53c)){if('formatBlock'==_0x502eaf&&('imageStylePreApply'==_0x2bfbad||'imageStylePostApply'==_0x2bfbad)){const _0x36b4a9=_0x856082['getSuggestion'](_0x5ea53c);if(_0x184536['newRange']){const _0x154d03=_0x36b4a9['getFirstRange']()['getContainedElement']();if(_0x506465['isBlockImage'](_0x154d03))continue;_0x856082['discardSuggestion'](_0x36b4a9),_0x1db3a5=!0x0;}}if('insertion'==_0x502eaf&&'imageCaption'==_0x2bfbad&&!_0x184536['newRange']){const _0x3d778e=_0x856082['getSuggestion'](_0x5ea53c);_0x3d778e['next']&&_0x3d778e['next']['isInContent']&&(_0x856082['discardSuggestion'](_0x3d778e['next']),_0x1db3a5=!0x0);}}}return _0x1db3a5;}),_0x3da5f5['plugins']['has']('ImageResize')&&_0x856082['enableCommand']('resizeImage',(_0x59abd7,_0xd8707c)=>{const _0xfb4cbb=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);_0xfb4cbb['getAttribute']('width')!=_0xd8707c['width']&&_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0xfb4cbb,{'commandName':'resizeImage','commandParams':[_0xd8707c]});});}),_0x3da5f5['plugins']['has']('ImageTextAlternativeEditing')&&_0x856082['enableCommand']('imageTextAlternative',(_0x9020f1,_0x49aa72)=>{const _0x58d930=_0x506465['getClosestSelectedImageElement'](_0x3da5f5['model']['document']['selection']);(_0x58d930['hasAttribute']('alt')?_0x58d930['getAttribute']('alt'):'')!=_0x49aa72['newValue']&&_0x3da5f5['model']['change'](()=>{_0x856082['markBlockFormat'](_0x58d930,{'commandName':'imageTextAlternative','commandParams':[_0x49aa72]});});}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x3e86a4=>{if(!!_0x2d7aeb['find'](({type:_0x1adacb,subType:_0x5d35d1})=>_0x3e86a4['type']==_0x1adacb&&_0x3e86a4['subType']==_0x5d35d1))return _0x3e86a4['previous']?{}:void 0x0;}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x348b75=>{if('insertion'==_0x348b75['type']||'deletion'==_0x348b75['type']){const _0x347f3e=_0x348b75['getContainedElement']();if(_0x347f3e&&_0x347f3e['is']('element','caption'))return{'type':'insertion'==_0x348b75['type']?'addObject':'removeObject','name':_0x347f3e['name'],'quantity':0x1};}}),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x39786b=>'formatBlock'==_0x39786b['type']&&'convertInlineImageToBlock'==_0x39786b['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x39786b['type']&&'convertBlockImageToInline'==_0x39786b['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x856082['_descriptionFactory']['registerDescriptionCallback'](_0x5dd94e=>{const {data:_0x2fe58d}=_0x5dd94e;if(_0x2fe58d){if('imageStyle'==_0x2fe58d['commandName']){const _0x1a92c4=_0x2fe58d['commandParams'][0x0]['value'];return _0x1bff96('side'===_0x1a92c4?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x526b4e[_0x1a92c4]||_0x1a92c4);}if('imageTextAlternative'==_0x2fe58d['commandName']){const _0x28208e=_0x2fe58d['commandParams'][0x0]['newValue'];return _0x28208e?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x28208e+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x2fe58d['commandName']){const _0x5b9ad7=_0x2fe58d['commandParams'][0x0]['width'];return _0x5b9ad7?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x5b9ad7)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x1bff96(_0x56d344){return{'type':'format','content':t('*Format:*\x20%0',_0x56d344)};}});}}
|
|
23
|
+
import{Plugin as _0x52bab4}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x329abb}from'ckeditor5/src/utils';import'../../theme/integrations/image.css';export default class z extends _0x52bab4{['afterInit'](){const _0x118954=this['editor'];if(!_0x118954['plugins']['has']('ImageEditing'))return;const _0x31d716=_0x118954['plugins']['get']('TrackChangesEditing'),_0x37678e=_0x118954['plugins']['get']('ImageUtils'),_0x51435c={},{t:t}=_0x118954['locale'];if(_0x31d716['enableCommand']('insertImage'),_0x31d716['_descriptionFactory']['registerElementLabel']('imageBlock',_0x1b3798=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x1b3798)),_0x31d716['_descriptionFactory']['registerElementLabel']('imageInline',_0x487581=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x487581)),_0x31d716['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x118954['plugins']['has']('ImageUploadEditing')&&_0x31d716['enableCommand']('uploadImage'),_0x118954['plugins']['has']('ImageBlockEditing')&&_0x118954['plugins']['has']('ImageInlineEditing')&&(_0x31d716['enableCommand']('imageTypeInline',(_0x516836,_0x2bb242)=>{const _0x299acc=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']);_0x118954['model']['change'](()=>{_0x31d716['markBlockFormat'](_0x299acc,{'commandName':'imageTypeInline','commandParams':[_0x2bb242]},[],'convertBlockImageToInline');});}),_0x31d716['enableCommand']('imageTypeBlock',(_0x1ec405,_0x273eb7)=>{_0x118954['model']['change'](_0x41a330=>{let _0x3191ef=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x3299f4=_0x41a330['createRangeOn'](_0x3191ef);const _0x2e739f=te['fromPosition'](_0x3299f4['start'],'toPrevious'),_0x9e15fe=te['fromPosition'](_0x3299f4['end'],'toNext');_0x31d716['forceDefaultExecution'](()=>_0x1ec405(_0x273eb7)),_0x3191ef=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x3299f4=_0x41a330['createRangeOn'](_0x3191ef);const _0x4a00d9=_0x41a330['createRange'](_0x2e739f,_0x9e15fe);_0x2e739f['detach'](),_0x9e15fe['detach'](),_0x31d716['markBlockFormat'](_0x3191ef,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x4a00d9['start']['isBefore'](_0x3299f4['start'])&&_0x31d716['markInsertion'](_0x41a330['createRange'](_0x4a00d9['start'],_0x3299f4['start']),'convertInlineImageToBlock'),_0x3299f4['end']['isBefore'](_0x4a00d9['end'])&&_0x31d716['markInsertion'](_0x41a330['createRange'](_0x3299f4['end'],_0x4a00d9['end']),'convertInlineImageToBlock');});}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x31d716['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x31d716['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x473010])=>{const _0x1483fd=_0x31d716['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x5b05c6=_0x473010['start'],_0x25d6a4=_0x473010['end'];const _0x238009=_0x118954['model']['schema']['getNearestSelectionRange'](_0x5b05c6,'backward'),_0x51c59f=_0x118954['model']['schema']['getNearestSelectionRange'](_0x25d6a4,'forward');_0x238009['isCollapsed']&&(_0x5b05c6=_0x238009['start']),_0x51c59f['isCollapsed']&&(_0x25d6a4=_0x51c59f['end']),_0x1483fd([_0x118954['model']['createRange'](_0x5b05c6,_0x25d6a4)]);}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0x1aa644),_0x31d716['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0x1aa644)),_0x118954['plugins']['has']('ImageCaptionEditing')&&(_0x31d716['enableCommand']('toggleImageCaption',(_0x48cb20,_0x1275c3)=>{const _0x57f4a4=_0x118954['plugins']['get']('ImageCaptionUtils');let _0x2fc64d=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x231ded=_0x57f4a4['getCaptionFromImageModelElement'](_0x2fc64d);_0x118954['model']['change'](()=>{if(_0x231ded)return void _0x31d716['markDeletion'](_0x118954['model']['createRangeOn'](_0x231ded));const _0x74ad5f=_0x37678e['isBlockImage'](_0x2fc64d);_0x48cb20(_0x1275c3),_0x2fc64d=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x231ded=_0x57f4a4['getCaptionFromImageModelElement'](_0x2fc64d),_0x31d716['markInsertion'](_0x118954['model']['createRangeOn'](_0x231ded),_0x74ad5f?null:'imageCaption');});}),_0x31d716['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0x1aa644)),_0x118954['plugins']['has']('ImageStyleEditing')){_0x31d716['enableCommand']('imageStyle',(_0x11f053,_0x4086f8)=>{const _0x5745cf=_0x118954['plugins']['get']('Users')['me'],_0x4674a8=_0x118954['commands']['get']('imageStyle');let _0x79d89c=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x2165dc=_0x118954['model']['createRangeOn'](_0x79d89c),_0x5bbfe8=_0x4674a8['value'];if(_0x5bbfe8==_0x4086f8['value'])return;const _0x2e815a={'commandName':'imageStyle','commandParams':[_0x4086f8],'formatGroupId':_0x329abb()};_0x118954['model']['change'](()=>{if(_0x31d716['getSuggestions']()['filter'](_0x3bd4d1=>_0x3bd4d1['isInContent']&&_0x5745cf==_0x3bd4d1['author']&&('formatBlock'==_0x3bd4d1['type']||'formatInline'==_0x3bd4d1['type'])&&('imageStylePreApply'==_0x3bd4d1['subType']||'imageStylePostApply'==_0x3bd4d1['subType'])&&_0x3bd4d1['getFirstRange']()['isEqual'](_0x2165dc))['forEach'](_0x3d651c=>_0x31d716['discardSuggestion'](_0x3d651c['head'])),_0x79d89c=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),_0x2165dc=_0x118954['model']['createRangeOn'](_0x79d89c),_0x4674a8['refresh'](),_0x118954['commands']['get']('imageTypeInline')['refresh'](),_0x118954['commands']['get']('imageTypeBlock')['refresh'](),_0x5bbfe8=_0x4674a8['value'],_0x5bbfe8!=_0x4086f8['value'])return _0x37678e['isInlineImage'](_0x79d89c)&&_0x4674a8['shouldConvertImageType'](_0x4086f8['value'],_0x79d89c)?(_0x11f053(_0x4086f8),_0x79d89c=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']),void _0x31d716['markBlockFormat'](_0x79d89c,{..._0x2e815a,'commandReversedParams':[{'value':_0x5bbfe8||null}]},[],'imageStylePreApply')):void(_0x37678e['isBlockImage'](_0x79d89c)?_0x31d716['markBlockFormat'](_0x79d89c,_0x2e815a,[],'imageStylePostApply'):_0x31d716['markInlineFormat'](_0x2165dc,_0x2e815a,'imageStylePostApply'));});});for(const _0x44a7f7 of _0x118954['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x51435c[_0x44a7f7['name']]=_0x44a7f7['title']['toLowerCase']();_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x4353cb,_0x3b28b0)=>{_0x31d716['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x4353cb,{'commandName':_0x3b28b0['commandName'],'commandParams':_0x3b28b0['commandReversedParams']});}),_0x31d716['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0x1aa644);}const _0x181d3a=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x3cd833(_0x4c04f2,_0x388901){const _0x4bd085=_0x181d3a['findIndex'](({type:_0x3372c5,subType:_0x72c0b7})=>_0x4c04f2['type']==_0x3372c5&&_0x4c04f2['subType']==_0x72c0b7),_0x5766db=_0x181d3a['findIndex'](({type:_0x247768,subType:_0x571bac})=>_0x388901['type']==_0x247768&&_0x388901['subType']==_0x571bac);if(_0x4bd085<0x0||_0x5766db<0x0)return!0x1;const _0xc91a5e=_0x4c04f2['getFirstRange'](),_0x5b1625=_0x388901['getFirstRange']();if((0x0==_0x4bd085||0x1==_0x4bd085)&&0x2==_0x5766db&&_0xc91a5e['isIntersecting'](_0x5b1625))return!0x0;if(0x2==_0x4bd085&&0x3==_0x5766db){const _0x36f4d3=_0x31d716['_findSuggestions'](_0xc91a5e,'insertion')['filter'](({suggestion:_0x3f92d6,meta:_0x54cccb})=>_0x54cccb['isOwn']&&'convertInlineImageToBlock'==_0x3f92d6['subType']);if(_0x36f4d3['length']>0x1&&_0x5b1625['end']['isEqual'](_0xc91a5e['start']))return!0x0;if(0x1==_0x36f4d3['length']&&(_0xc91a5e['start']['isEqual'](_0x5b1625['end'])||_0xc91a5e['end']['isEqual'](_0x5b1625['start'])))return!0x0;}if(0x3==_0x4bd085&&0x3==_0x5766db&&_0xc91a5e['start']['isBefore'](_0x5b1625['start'])){const _0x171f0b=_0xc91a5e['end']['nodeAfter'],_0x570eab=_0x5b1625['start']['nodeBefore'];return _0x37678e['isBlockImage'](_0x171f0b)&&_0x171f0b===_0x570eab;}return!0x1;}function _0x1aa644(_0x1e3590,_0x1572da){return _0x3cd833(_0x1e3590,_0x1572da)?[_0x1e3590,_0x1572da]:_0x3cd833(_0x1572da,_0x1e3590)?[_0x1572da,_0x1e3590]:null;}_0x118954['model']['document']['registerPostFixer'](()=>{let _0x175ddc=!0x1;const _0x44c3a5=Array['from'](_0x118954['model']['document']['differ']['getChangedMarkers']());for(const {name:_0xffe7f3,data:_0x5c57c6}of _0x44c3a5){const {group:_0x3558fc,type:_0x48bb61,subType:_0x4f4287,id:_0x3bec2a}=_0x31d716['_splitMarkerName'](_0xffe7f3);if('suggestion'==_0x3558fc&&_0x31d716['hasSuggestion'](_0x3bec2a)){if('formatBlock'==_0x48bb61&&('imageStylePreApply'==_0x4f4287||'imageStylePostApply'==_0x4f4287)){const _0x41f00f=_0x31d716['getSuggestion'](_0x3bec2a);if(_0x5c57c6['newRange']){const _0x3808ec=_0x41f00f['getFirstRange']()['getContainedElement']();if(_0x37678e['isBlockImage'](_0x3808ec))continue;_0x31d716['discardSuggestion'](_0x41f00f),_0x175ddc=!0x0;}}if('insertion'==_0x48bb61&&'imageCaption'==_0x4f4287&&!_0x5c57c6['newRange']){const _0x8987c0=_0x31d716['getSuggestion'](_0x3bec2a);_0x8987c0['next']&&_0x8987c0['next']['isInContent']&&(_0x31d716['discardSuggestion'](_0x8987c0['next']),_0x175ddc=!0x0);}}}return _0x175ddc;}),_0x118954['plugins']['has']('ImageResize')&&_0x31d716['enableCommand']('resizeImage',(_0x19d905,_0x2c3cfc)=>{const _0x23c469=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']);_0x23c469['getAttribute']('width')!=_0x2c3cfc['width']&&_0x118954['model']['change'](()=>{_0x31d716['markBlockFormat'](_0x23c469,{'commandName':'resizeImage','commandParams':[_0x2c3cfc]});});}),_0x118954['plugins']['has']('ImageTextAlternativeEditing')&&_0x31d716['enableCommand']('imageTextAlternative',(_0x5f4ad9,_0x3bfdd8)=>{const _0x30acd2=_0x37678e['getClosestSelectedImageElement'](_0x118954['model']['document']['selection']);(_0x30acd2['hasAttribute']('alt')?_0x30acd2['getAttribute']('alt'):'')!=_0x3bfdd8['newValue']&&_0x118954['model']['change'](()=>{_0x31d716['markBlockFormat'](_0x30acd2,{'commandName':'imageTextAlternative','commandParams':[_0x3bfdd8]});});}),_0x31d716['_descriptionFactory']['registerDescriptionCallback'](_0x244e4e=>{if(!!_0x181d3a['find'](({type:_0x3dad4b,subType:_0x53f624})=>_0x244e4e['type']==_0x3dad4b&&_0x244e4e['subType']==_0x53f624))return _0x244e4e['previous']?{}:void 0x0;}),_0x31d716['_descriptionFactory']['registerDescriptionCallback'](_0x488cdc=>{if('insertion'==_0x488cdc['type']||'deletion'==_0x488cdc['type']){const _0xb405f7=_0x488cdc['getContainedElement']();if(_0xb405f7&&_0xb405f7['is']('element','caption'))return{'type':'insertion'==_0x488cdc['type']?'addObject':'removeObject','name':_0xb405f7['name'],'quantity':0x1};}}),_0x31d716['_descriptionFactory']['registerDescriptionCallback'](_0x353ef=>'formatBlock'==_0x353ef['type']&&'convertInlineImageToBlock'==_0x353ef['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x353ef['type']&&'convertBlockImageToInline'==_0x353ef['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x31d716['_descriptionFactory']['registerDescriptionCallback'](_0x33f024=>{const {data:_0x3c779f}=_0x33f024;if(_0x3c779f){if('imageStyle'==_0x3c779f['commandName']){const _0x5eb33e=_0x3c779f['commandParams'][0x0]['value'];return _0x3e5ad8('side'===_0x5eb33e?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x51435c[_0x5eb33e]||_0x5eb33e);}if('imageTextAlternative'==_0x3c779f['commandName']){const _0x406fbc=_0x3c779f['commandParams'][0x0]['newValue'];return _0x406fbc?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x406fbc+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x3c779f['commandName']){const _0x8ab1dd=_0x3c779f['commandParams'][0x0]['width'];return _0x8ab1dd?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x8ab1dd)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x3e5ad8(_0x499b7){return{'type':'format','content':t('*Format:*\x20%0',_0x499b7)};}});}}
|
|
@@ -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 _0x5d08a4}from'ckeditor5/src/core';export default class J extends _0x5d08a4{['afterInit'](){const _0x41e3e4=this['editor'],_0x1ea323=_0x41e3e4['plugins']['get']('TrackChangesEditing');_0x41e3e4['plugins']['has']('IndentEditing')&&(_0x1ea323['enableCommand']('indent'),_0x1ea323['enableCommand']('outdent'));const {t:t}=_0x41e3e4['locale'];if(_0x41e3e4['plugins']['has']('IndentBlock')){for(const _0x529d7a of['indentBlock','outdentBlock'])_0x1ea323['enableCommand'](_0x529d7a,()=>{const _0x5a0bcf=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x156a07=>this['editor']['model']['schema']['checkAttribute'](_0x156a07,'blockIndent'));_0x41e3e4['model']['change'](()=>{for(const _0x42eac0 of _0x5a0bcf)_0x1ea323['markBlockFormat'](_0x42eac0,{'commandName':_0x529d7a,'commandParams':[{'value':''}],'formatGroupId':'indentBlock'});});});_0x1ea323['_descriptionFactory']['registerDescriptionCallback'](_0x16aa40=>{const {data:_0x3be956}=_0x16aa40;if(!_0x3be956)return;if('indentBlock'!=_0x3be956['commandName']&&'outdentBlock'!=_0x3be956['commandName'])return;const _0x241c11=_0x16aa40['getItems']()[0x0],_0x17426=_0x1ea323['_descriptionFactory']['getItemLabel'](_0x241c11['name']);return'indentBlock'==_0x3be956['commandName']?{'type':'format','content':t('*Indent:*\x20%0',_0x17426)}:'outdentBlock'==_0x3be956['commandName']?{'type':'format','content':t('*Outdent:*\x20%0',_0x17426)}: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 _0x16a8=['requires','TrackChangesEditing','get','enableCommand','editor','plugins'];(function(_0x58ee30,_0x16a871){var _0x429c48=function(_0x5de3d8){while(--_0x5de3d8){_0x58ee30['push'](_0x58ee30['shift']());}};_0x429c48(++_0x16a871);}(_0x16a8,0x1d9));var _0x429c=function(_0x58ee30,_0x16a871){_0x58ee30=_0x58ee30-0x0;var _0x429c48=_0x16a8[_0x58ee30];return _0x429c48;};import{Plugin as _0x81c938}from'ckeditor5/src/core';import{Input as _0x85beb8}from'ckeditor5/src/typing';export default class K extends _0x81c938{static get[_0x429c('0x1')](){return[_0x85beb8];}['init'](){this[_0x429c('0x5')][_0x429c('0x0')][_0x429c('0x3')](_0x429c('0x2'))[_0x429c('0x4')]('input');}}
|
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 _0x17adc8}from'ckeditor5/src/core';import{findAttributeRange as _0x5bbb73}from'ckeditor5/src/typing';import{getRangesWithAttribute as Rt}from'./utils';export default class Q extends _0x17adc8{['afterInit'](){const _0x225166=this['editor'];if(!_0x225166['plugins']['has']('LinkEditing'))return;const _0x4227ca=_0x225166['plugins']['get']('TrackChangesEditing');_0x4227ca['enableCommand']('link',(_0x328d87,_0x316041)=>{const _0x3810c5=_0x225166['model']['document']['selection'];let _0x5c4cd9=[];if(_0x3810c5['isCollapsed']){if(!_0x3810c5['hasAttribute']('linkHref'))return void _0x328d87(_0x316041);{const _0x5d3b10=_0x5bbb73(_0x3810c5['getFirstPosition'](),'linkHref',_0x3810c5['getAttribute']('linkHref'),_0x225166['model']);_0x5c4cd9=[_0x5d3b10];}}else _0x5c4cd9=Array['from'](_0x3810c5['getRanges']());_0x225166['model']['change'](()=>{for(const _0x9a9e9d of _0x5c4cd9)_0x4227ca['markInlineFormat'](_0x9a9e9d,{'commandName':'link','commandParams':[_0x316041]});});}),_0x4227ca['enableCommand']('unlink',()=>{const _0x410285=this['editor']['model'],_0x3b5131=_0x410285['document']['selection'];_0x410285['change'](()=>{let _0x22afc6=[];if(_0x3b5131['isCollapsed'])_0x22afc6=[_0x5bbb73(_0x3b5131['getFirstPosition'](),'linkHref',_0x3b5131['getAttribute']('linkHref'),_0x225166['model'])];else _0x22afc6=Rt('linkHref',_0x3b5131['getFirstRange'](),_0x225166['model']);for(const _0x5e7a51 of _0x22afc6)_0x4227ca['markInlineFormat'](_0x5e7a51,{'commandName':'unlink','commandParams':[]});});}),_0x4227ca['_descriptionFactory']['registerDescriptionCallback'](_0x2707db=>{const {data:_0x3697d3}=_0x2707db,{t:t}=_0x225166['locale'];if(_0x3697d3){if('link'==_0x3697d3['commandName'])return{'type':'format','content':t('*Set\x20link:*\x20%0','\x22'+_0x3697d3['commandParams'][0x0]+'\x22')};return'unlink'==_0x3697d3['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 _0x3edc22}from'ckeditor5/src/core';export default class V extends _0x3edc22{['afterInit'](){const _0x827eca=this['editor'];if(!_0x827eca['plugins']['has']('ListEditing'))return;const _0x1fb391=_0x827eca['plugins']['get']('TrackChangesEditing'),_0x5368fd=_0x827eca['plugins']['has']('TodoListEditing');function _0x1a2e62(_0x84755){return()=>{const _0x6ff246=_0x827eca['model']['document']['selection'],_0x338216=_0x827eca['commands']['get'](_0x84755);if(_0x338216['value'])return void _0x827eca['execute']('paragraph',{});const _0x480c89=_0x84755['slice'](0x0,-0x4),_0x2851f9=function(_0x3ddf2d,_0xf7a7e8,_0x505be7){let _0x1529a6=Array['from'](_0x3ddf2d)['filter'](_0x3ce4f6=>function(_0x4cf72b,_0x4154c4){return _0x4154c4['checkChild'](_0x4cf72b['parent'],'listItem')&&!_0x4154c4['isObject'](_0x4cf72b);}(_0x3ce4f6,_0x505be7));_0x1529a6=_0x1529a6['filter'](_0x3cd688=>!_0x3cd688['is']('element','listItem')||_0x3cd688['getAttribute']('listType')!=_0xf7a7e8);const _0x432ee6=new Set();for(const _0x397959 of _0x1529a6)_0x397959['is']('element','listItem')?_0x432ee6['add'](Mt(_0x397959)):_0x432ee6['add'](_0x397959);return Array['from'](_0x432ee6);}(_0x6ff246['getSelectedBlocks'](),_0x480c89,_0x827eca['model']['schema']);_0x827eca['model']['change'](()=>{for(const _0x5f319e of _0x2851f9)_0x1fb391['markBlockFormat'](_0x5f319e,{'commandName':_0x84755,'commandParams':[{'forceValue':!_0x338216['value']}],'formatGroupId':'blockName'},Pt(_0x5f319e));});};}function _0x53b71c(_0x5c4a9c){return()=>{const _0x1ef156=function(_0x1c5d1d){const _0x5ad4c3=(_0x1c5d1d=Array['from'](_0x1c5d1d))['findIndex'](_0x2123e7=>'listItem'!=_0x2123e7['name']);return _0x5ad4c3>-0x1&&(_0x1c5d1d=_0x1c5d1d['slice'](0x0,_0x5ad4c3)),_0x1c5d1d;}(_0x827eca['model']['document']['selection']['getSelectedBlocks']()),_0xae686b=_0x827eca['model']['createRange'](_0x827eca['model']['createPositionAt'](_0x1ef156[0x0],'before'),_0x827eca['model']['createPositionAt'](_0x1ef156[_0x1ef156['length']-0x1],'end'));_0x827eca['model']['change'](()=>{_0x1fb391['markBlockFormat'](_0xae686b,{'commandName':_0x5c4a9c,'commandParams':[],'formatGroupId':'listIndent'},function(_0x547f5b){const _0x437d38=new Set();for(const _0x11cda6 of _0x547f5b){let _0x5bff78=_0x11cda6['nextSibling'];for(;_0x5bff78&&_0x5bff78['getAttribute']('listIndent')>_0x11cda6['getAttribute']('listIndent');)_0x437d38['add'](_0x5bff78),_0x5bff78=_0x5bff78['nextSibling'];}return Array['from'](_0x437d38);}(_0x1ef156));});};}_0x1fb391['enableCommand']('numberedList',_0x1a2e62('numberedList')),_0x1fb391['enableCommand']('bulletedList',_0x1a2e62('bulletedList')),_0x5368fd&&_0x1fb391['enableCommand']('todoList',_0x1a2e62('todoList')),_0x1fb391['enableCommand']('indentList',_0x53b71c('indentList')),_0x1fb391['enableCommand']('outdentList',_0x53b71c('outdentList')),_0x5368fd&&_0x1fb391['enableCommand']('checkTodoList',()=>{const _0xeca569=_0x827eca['commands']['get']('checkTodoList'),_0x58b7d7=Array['from'](_0xeca569['_selectedElements']);_0x58b7d7['filter'](_0xe7483e=>_0xe7483e['getAttribute']('todoListChecked')!=_0xeca569['value']),_0x827eca['model']['change'](()=>{for(const _0x547400 of _0x58b7d7)_0x1fb391['markBlockFormat'](_0x547400,{'commandName':'checkTodoList','commandParams':[{'forceValue':!_0xeca569['value']}]});});});const {t:t}=_0x827eca['locale'];_0x1fb391['_descriptionFactory']['registerElementLabel']('listItem',_0x32d9c2=>t({'string':'list\x20item','plural':'%0\x20list\x20items','id':'ELEMENT_LIST_ITEM'},_0x32d9c2)),_0x1fb391['_descriptionFactory']['registerDescriptionCallback'](_0x6d89ed=>{const {data:_0x51f576}=_0x6d89ed;if(_0x51f576){if('numberedList'==_0x51f576['commandName']||'bulletedList'==_0x51f576['commandName']||'todoList'==_0x51f576['commandName'])switch(_0x51f576['commandName']['replace']('List','')){case'bulleted':return _0x13677b(t({'string':'bulleted\x20list','id':'ELEMENT_BULLETED_LIST'}));case'numbered':return _0x13677b(t({'string':'numbered\x20list','id':'ELEMENT_NUMBERED_LIST'}));case'todo':return _0x13677b(t({'string':'to-do\x20list','id':'ELEMENT_TODO_LIST'}));}if('indentList'==_0x51f576['commandName'])return{'type':'format','content':t('*Indent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('outdentList'==_0x51f576['commandName'])return{'type':'format','content':t('*Outdent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('checkTodoList'==_0x51f576['commandName'])return _0x51f576['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Check\x20item*')}:{'type':'format','content':t('*Uncheck\x20item*')};}function _0x13677b(_0x4b7866){return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x4b7866)};}});}}function Mt(_0x9c049d){const _0x7e733e=_0x9c049d['getAttribute']('listIndent');if(0x0==_0x7e733e)return _0x9c049d;let _0xdf7783=_0x9c049d;for(;_0x9c049d['previousSibling']&&_0x9c049d['previousSibling']['is']('element','listItem');){const _0x1b1990=_0x9c049d['previousSibling']['getAttribute']('listIndent');if(_0x1b1990==_0x7e733e)_0xdf7783=_0x9c049d['previousSibling'];else{if(_0x1b1990<_0x7e733e)break;}_0x9c049d=_0x9c049d['previousSibling'];}return _0xdf7783;}function Pt(_0x518fc9){const _0x26baa5=[];if(_0x518fc9['is']('element','listItem')&&_0x518fc9['getAttribute']('listIndent')>0x0){let _0x51ef4f=_0x518fc9['nextSibling'];for(;_0x51ef4f&&'listItem'==_0x51ef4f['name']&&_0x51ef4f['getAttribute']('listIndent')==_0x518fc9['getAttribute']('listIndent');)_0x26baa5['push'](_0x51ef4f),_0x51ef4f=_0x51ef4f['nextSibling'];}return _0x26baa5;}
|
|
@@ -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 _0x1bc967}from'ckeditor5/src/core';import'../../theme/integrations/mediaembed.css';export default class X extends _0x1bc967{['afterInit'](){const _0xfe8941=this['editor'];if(!_0xfe8941['plugins']['has']('MediaEmbedEditing'))return;const _0x25f2b9=_0xfe8941['plugins']['get']('TrackChangesEditing'),{t:t}=_0xfe8941['locale'];_0x25f2b9['enableCommand']('mediaEmbed'),_0x25f2b9['_descriptionFactory']['registerElementLabel']('media',_0x126c5e=>t({'string':'media\x20item','plural':'%0\x20media\x20items','id':'ELEMENT_MEDIA'},_0x126c5e)),_0xfe8941['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a0db8,{writer:_0x567a54,options:_0x3ca8e8})=>{if(_0x3ca8e8['showSuggestionHighlights'])return _0x567a54['createEmptyElement']('div');},'converterPriority':'high'}),_0xfe8941['data']['downcastDispatcher']['on']('attribute:url:media',(_0x46ead7,_0xdd7e45,_0x8d9736)=>{_0x8d9736['options']['showSuggestionHighlights']&&_0x46ead7['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 _0x4d67=['MentionEditing','mention','get','plugins','has','afterInit'];(function(_0x383606,_0x4d6744){const _0x8c3b9c=function(_0x5bb80a){while(--_0x5bb80a){_0x383606['push'](_0x383606['shift']());}};_0x8c3b9c(++_0x4d6744);}(_0x4d67,0x150));const _0x8c3b=function(_0x383606,_0x4d6744){_0x383606=_0x383606-0x0;let _0x8c3b9c=_0x4d67[_0x383606];return _0x8c3b9c;};import{Plugin as _0x2fb231}from'ckeditor5/src/core';export default class Y extends _0x2fb231{[_0x8c3b('0x5')](){const _0x43a8de=this['editor'];_0x43a8de[_0x8c3b('0x3')][_0x8c3b('0x4')](_0x8c3b('0x0'))&&_0x43a8de['plugins'][_0x8c3b('0x2')]('TrackChangesEditing')['enableCommand'](_0x8c3b('0x1'));}}
|
|
@@ -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 _0x5957c5}from'ckeditor5/src/core';import'../../theme/integrations/pagebreak.css';export default class Z extends _0x5957c5{['afterInit'](){const _0x25337c=this['editor'];if(!_0x25337c['plugins']['has']('PageBreakEditing'))return;_0x25337c['plugins']['get']('TrackChangesEditing')['enableCommand']('pageBreak');const _0x23d308=_0x25337c['plugins']['get']('TrackChangesEditing'),{t:t}=_0x25337c['locale'];_0x23d308['_descriptionFactory']['registerElementLabel']('pageBreak',_0x431d5a=>t({'string':'page\x20break','plural':'%0\x20page\x20breaks','id':'ELEMENT_PAGE_BREAK'},_0x431d5a));}}
|