@ckeditor/ckeditor5-track-changes 30.0.0 → 31.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/package.json +7 -7
- package/src/commands/acceptallsuggestionscommand.js +1 -1
- package/src/commands/acceptselectedsuggestionscommand.js +1 -1
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardallsuggestionscommand.js +1 -1
- package/src/commands/discardselectedsuggestionscommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/getselectedsuggestions.js +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/normalizedescription.js +1 -1
- package/src/utils/sortsuggestions.js +1 -1
- package/src/integrations/exportpdf.js +0 -23
- package/src/integrations/exportword.js +0 -23
- package/src/integrations/selectall.js +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-track-changes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "CKEditor 5 track changes plugin.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"framework"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ckeditor/ckeditor5-collaboration-core": "^
|
|
30
|
-
"@ckeditor/ckeditor5-comments": "^
|
|
31
|
-
"@ckeditor/ckeditor5-font": "^
|
|
32
|
-
"@ckeditor/ckeditor5-image": "^
|
|
33
|
-
"@ckeditor/ckeditor5-table": "^
|
|
34
|
-
"ckeditor5": "^
|
|
29
|
+
"@ckeditor/ckeditor5-collaboration-core": "^31.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-comments": "^31.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-font": "^31.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-image": "^31.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-table": "^31.0.0",
|
|
34
|
+
"ckeditor5": "^31.0.0",
|
|
35
35
|
"lodash-es": "^4.17.11"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3f1d=['_acceptSuggestionCommand','isInContent','change','refresh','some','isEnabled','execute','_suggestions','editor','values','from','model'];(function(_0x50c73c,_0x3f1d13){const _0x337749=function(_0x2ff38e){while(--_0x2ff38e){_0x50c73c['push'](_0x50c73c['shift']());}};_0x337749(++_0x3f1d13);}(_0x3f1d,0x1b7));const _0x3377=function(_0x50c73c,_0x3f1d13){_0x50c73c=_0x50c73c-0x0;let _0x337749=_0x3f1d[_0x50c73c];return _0x337749;};import{Command as _0x4e0659}from'ckeditor5/src/core';import _0x1e2c32 from'../utils/sortsuggestions';export default class R extends _0x4e0659{constructor(_0x2f9b83,_0x557495,_0x3ffc99){super(_0x2f9b83),this[_0x3377('0x5')]=_0x557495,this[_0x3377('0x0')]=_0x3ffc99,this[_0x3377('0x8')]();}[_0x3377('0x8')](){const _0x3bb268=this[_0x3377('0x5')];this[_0x3377('0xa')]=_0x3bb268[_0x3377('0xa')]&&Array[_0x3377('0x3')](this['_suggestions'][_0x3377('0x2')]())[_0x3377('0x9')](_0x4e58fe=>_0x4e58fe['isInContent']);}[_0x3377('0xb')](){this[_0x3377('0x1')][_0x3377('0x4')][_0x3377('0x7')](()=>{const _0x3156be=_0x1e2c32(Array[_0x3377('0x3')](this['_suggestions'][_0x3377('0x2')]()));for(const _0x238a68 of _0x3156be)_0x238a68[_0x3377('0x6')]&&this['_acceptSuggestionCommand']['execute'](_0x238a68['id']);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1ea5=['size','_suggestions','document','_selectedSuggestions','values','change','from','refresh','editor','model','_acceptSuggestionCommand','isEnabled','execute'];(function(_0x99df94,_0x1ea5cc){const _0x157c37=function(_0xb77ae8){while(--_0xb77ae8){_0x99df94['push'](_0x99df94['shift']());}};_0x157c37(++_0x1ea5cc);}(_0x1ea5,0x8c));const _0x157c=function(_0x99df94,_0x1ea5cc){_0x99df94=_0x99df94-0x0;let _0x157c37=_0x1ea5[_0x99df94];return _0x157c37;};import{Command as _0x1dda70}from'ckeditor5/src/core';import _0x35585f from'../utils/sortsuggestions';import _0x12ae4e from'../utils/getselectedsuggestions';export default class E extends _0x1dda70{constructor(_0x132d9d,_0x2e871d,_0x55dcbd){super(_0x132d9d),this[_0x157c('0x0')]=_0x2e871d,this[_0x157c('0x4')]=_0x55dcbd,this[_0x157c('0x6')]=new Set(),this['refresh']();}[_0x157c('0xa')](){const _0x2099ea=this[_0x157c('0x0')],_0x1ed034=this[_0x157c('0xb')][_0x157c('0xc')][_0x157c('0x5')]['selection'],_0xc0b647=Array[_0x157c('0x9')](this[_0x157c('0x4')][_0x157c('0x7')]());this[_0x157c('0x6')]=_0x12ae4e(_0x1ed034,_0xc0b647),this[_0x157c('0x1')]=_0x2099ea[_0x157c('0x1')]&&!!this['_selectedSuggestions'][_0x157c('0x3')];}['execute'](){this['editor'][_0x157c('0xc')][_0x157c('0x8')](()=>{const _0x39052f=_0x35585f(Array[_0x157c('0x9')](this[_0x157c('0x6')]));for(const _0x2d2908 of _0x39052f)this[_0x157c('0x0')][_0x157c('0x2')](_0x2d2908['id']);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5cd2=['plugins','get','TrackChangesEditing','track-changes-accept-suggestion-not-found','editor','isEnabled','_suggestions','execute','refresh'];(function(_0x2873a3,_0x5cd275){const _0x58e00d=function(_0x3e4db9){while(--_0x3e4db9){_0x2873a3['push'](_0x2873a3['shift']());}};_0x58e00d(++_0x5cd275);}(_0x5cd2,0x10e));const _0x58e0=function(_0x2873a3,_0x5cd275){_0x2873a3=_0x2873a3-0x0;let _0x58e00d=_0x5cd2[_0x2873a3];return _0x58e00d;};import{Command as _0x599c81}from'ckeditor5/src/core';import{CKEditorError as _0x23a78b}from'ckeditor5/src/utils';export default class j extends _0x599c81{constructor(_0x3167d9,_0x53d63a){super(_0x3167d9),this['_suggestions']=_0x53d63a,this[_0x58e0('0x8')]();}[_0x58e0('0x8')](){this[_0x58e0('0x5')]=!0x0;}[_0x58e0('0x7')](_0x20036b){const _0x1432b8=this[_0x58e0('0x6')]['get'](_0x20036b);if(!_0x1432b8)throw new _0x23a78b(_0x58e0('0x3'),this);this[_0x58e0('0x4')][_0x58e0('0x0')][_0x58e0('0x1')](_0x58e0('0x2'))['acceptSuggestion'](_0x1432b8);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x22f1=['model','refresh','isEnabled','isInContent','_discardSuggestionCommand','_suggestions','some','values','editor','execute'];(function(_0x5e22c6,_0x22f112){const _0x367ede=function(_0x3a098d){while(--_0x3a098d){_0x5e22c6['push'](_0x5e22c6['shift']());}};_0x367ede(++_0x22f112);}(_0x22f1,0x1ef));const _0x367e=function(_0x5e22c6,_0x22f112){_0x5e22c6=_0x5e22c6-0x0;let _0x367ede=_0x22f1[_0x5e22c6];return _0x367ede;};import{Command as _0x372e36}from'ckeditor5/src/core';export default class x extends _0x372e36{constructor(_0x11dc66,_0x4b5d08,_0x263fd8){super(_0x11dc66),this[_0x367e('0x9')]=_0x4b5d08,this[_0x367e('0x0')]=_0x263fd8,this[_0x367e('0x6')]();}[_0x367e('0x6')](){const _0x45bab7=this[_0x367e('0x9')];this[_0x367e('0x7')]=_0x45bab7[_0x367e('0x7')]&&Array['from'](this[_0x367e('0x0')][_0x367e('0x2')]())[_0x367e('0x1')](_0x4f0586=>_0x4f0586[_0x367e('0x8')]);}[_0x367e('0x4')](){this[_0x367e('0x3')][_0x367e('0x5')]['change'](()=>{for(const _0x1b6788 of this[_0x367e('0x0')][_0x367e('0x2')]())_0x1b6788['isInContent']&&this[_0x367e('0x9')][_0x367e('0x4')](_0x1b6788['id']);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x28ad=['size','isEnabled','_selectedSuggestions','_discardSuggestionCommand','from','execute','refresh','change','editor','document','model','values','_suggestions'];(function(_0xdd1b79,_0x28ad47){const _0x3bcaf1=function(_0x524083){while(--_0x524083){_0xdd1b79['push'](_0xdd1b79['shift']());}};_0x3bcaf1(++_0x28ad47);}(_0x28ad,0x9e));const _0x3bca=function(_0xdd1b79,_0x28ad47){_0xdd1b79=_0xdd1b79-0x0;let _0x3bcaf1=_0x28ad[_0xdd1b79];return _0x3bcaf1;};import{Command as _0x22f5ae}from'ckeditor5/src/core';import _0x137225 from'../utils/getselectedsuggestions';export default class O extends _0x22f5ae{constructor(_0x8e8362,_0x5d6c31,_0x29682e){super(_0x8e8362),this[_0x3bca('0x1')]=_0x5d6c31,this[_0x3bca('0xa')]=_0x29682e,this[_0x3bca('0x0')]=new Set(),this[_0x3bca('0x4')]();}[_0x3bca('0x4')](){const _0x3d5385=this[_0x3bca('0x1')],_0x2138fc=this[_0x3bca('0x6')][_0x3bca('0x8')][_0x3bca('0x7')]['selection'],_0x9ea226=Array[_0x3bca('0x2')](this[_0x3bca('0xa')][_0x3bca('0x9')]());this[_0x3bca('0x0')]=_0x137225(_0x2138fc,_0x9ea226),this['isEnabled']=_0x3d5385[_0x3bca('0xc')]&&!!this[_0x3bca('0x0')][_0x3bca('0xb')];}['execute'](){this[_0x3bca('0x6')][_0x3bca('0x8')][_0x3bca('0x5')](()=>{for(const _0x195952 of this[_0x3bca('0x0')])this[_0x3bca('0x1')][_0x3bca('0x3')](_0x195952['id']);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3338=['track-changes-discard-suggestion-not-found','discardSuggestion','TrackChangesEditing','get','_suggestions','execute','refresh'];(function(_0x12e500,_0x3338a4){const _0x56efa5=function(_0x67f355){while(--_0x67f355){_0x12e500['push'](_0x12e500['shift']());}};_0x56efa5(++_0x3338a4);}(_0x3338,0xb3));const _0x56ef=function(_0x12e500,_0x3338a4){_0x12e500=_0x12e500-0x0;let _0x56efa5=_0x3338[_0x12e500];return _0x56efa5;};import{Command as _0x2534a5}from'ckeditor5/src/core';import{CKEditorError as _0x191975}from'ckeditor5/src/utils';export default class U extends _0x2534a5{constructor(_0xd5fcdc,_0x521a70){super(_0xd5fcdc),this['_suggestions']=_0x521a70,this[_0x56ef('0x2')]();}[_0x56ef('0x2')](){this['isEnabled']=!0x0;}[_0x56ef('0x1')](_0x420ffe){const _0x124968=this[_0x56ef('0x0')][_0x56ef('0x6')](_0x420ffe);if(!_0x124968)throw new _0x191975(_0x56ef('0x3'),this);this['editor']['plugins'][_0x56ef('0x6')](_0x56ef('0x5'))[_0x56ef('0x4')](_0x124968);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x271c=['_enableCommands','_enabledCommands','TrackChangesCommand','isEnabled','clearForceDisabled','_disableUnsupportedCommands','has','editor','value','affectsData','refresh','execute','commands','forceDisabled'];(function(_0x197ec8,_0x271cc1){const _0xad321=function(_0x2063ba){while(--_0x2063ba){_0x197ec8['push'](_0x197ec8['shift']());}};_0xad321(++_0x271cc1);}(_0x271c,0xcf));const _0xad32=function(_0x197ec8,_0x271cc1){_0x197ec8=_0x197ec8-0x0;let _0xad321=_0x271c[_0x197ec8];return _0xad321;};import{Command as _0x5152c9}from'ckeditor5/src/core';export default class N extends _0x5152c9{constructor(_0x1c5b27,_0x553523){super(_0x1c5b27),this[_0xad32('0x4')]=_0x553523,this[_0xad32('0xb')]=!0x1,this[_0xad32('0xd')]();}[_0xad32('0xd')](){this[_0xad32('0x6')]=!0x0;}[_0xad32('0x0')](){this[_0xad32('0xb')]=!this[_0xad32('0xb')],this[_0xad32('0xb')]?this[_0xad32('0x8')]():this[_0xad32('0x3')]();}[_0xad32('0x8')](){for(const _0xe56ba8 of this['editor'][_0xad32('0x1')][_0xad32('0x1')]())_0xe56ba8[_0xad32('0xc')]&&!this[_0xad32('0x4')][_0xad32('0x9')](_0xe56ba8)&&_0xe56ba8[_0xad32('0x2')](_0xad32('0x5'));}[_0xad32('0x3')](){for(const _0x1d7425 of this[_0xad32('0xa')][_0xad32('0x1')]['commands']())_0x1d7425[_0xad32('0xc')]&&!this['_enabledCommands'][_0xad32('0x9')](_0x1d7425)&&_0x1d7425[_0xad32('0x7')]('TrackChangesCommand');}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x35e1bb}from'ckeditor5/src/core';export default class P extends _0x35e1bb{['afterInit'](){const _0xf15e01=this['editor'],{t:t}=_0xf15e01['locale'];if(!_0xf15e01['plugins']['has']('AlignmentEditing'))return;const _0x3b786e=_0xf15e01['plugins']['get']('TrackChangesEditing');_0x3b786e['enableCommand']('alignment',(_0x313dfe,_0x4bd1b6={})=>{let _0x16e6ed=_0x4bd1b6['value'];_0x4bd1b6['value']||(_0x16e6ed='ltr'===_0xf15e01['locale']['contentLanguageDirection']?'left':'right');const _0x31e637=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x596952=>function(_0x440d3a,_0x41c75c,_0x3a906f){const _0x3e66b3=_0x440d3a['getAttribute']('alignment')||null;return _0x41c75c['checkAttribute'](_0x440d3a,'alignment')&&_0x3a906f!=_0x3e66b3;}(_0x596952,this['editor']['model']['schema'],_0x16e6ed));_0xf15e01['model']['change'](()=>{for(const _0x58b6da of _0x31e637)_0x3b786e['markBlockFormat'](_0x58b6da,{'commandName':'alignment','commandParams':[{'value':_0x16e6ed}]});});}),_0x3b786e['_descriptionFactory']['registerDescriptionCallback'](_0x4ca2fa=>{const {data:_0x3639f0}=_0x4ca2fa;if(_0x3639f0&&'alignment'==_0x3639f0['commandName']){const _0x4b5a5e=_0x3639f0['commandParams'][0x0]['value'];return{'type':'format','content':t('*Format:*\x20%0',function(_0x1caa13){switch(_0x1caa13){case'left':return t({'string':'align\x20to\x20left','id':'FORMAT_ALIGN_TO_LEFT'});case'right':return t({'string':'align\x20to\x20right','id':'FORMAT_ALIGN_TO_RIGHT'});case'center':return t({'string':'align\x20to\x20center','id':'FORMAT_ALIGN_TO_CENTER'});case'justify':return t({'string':'justify','id':'FORMAT_JUSTIFY_TEXT'});}}(_0x4b5a5e))};}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x3a9653}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';const Ft=['BoldEditing','ItalicEditing','UnderlineEditing','CodeEditing','StrikethroughEditing','SubscriptEditing','SuperscriptEditing'];export default class G extends _0x3a9653{['afterInit'](){const _0xc0d7b7=this['editor'],_0x22399e=_0xc0d7b7['model'],_0x1fa481=_0xc0d7b7['plugins']['get']('TrackChangesEditing'),{t:t}=_0xc0d7b7['locale'];for(const _0x401ed8 of Ft){if(!_0xc0d7b7['plugins']['has'](_0x401ed8))continue;const _0xa8943c=_0x401ed8['slice'](0x0,-0x7)['toLowerCase'](),_0x140f30=_0xc0d7b7['commands']['get'](_0xa8943c);_0x1fa481['enableCommand'](_0xa8943c,(_0x16b78a,_0x4dc8a5={})=>{const _0x578f55=_0x22399e['document']['selection'];if(_0x578f55['isCollapsed'])return void _0x16b78a(_0x4dc8a5);const _0x87b790=void 0x0!==_0x4dc8a5['forceValue']?_0x4dc8a5['forceValue']:!_0x140f30['value'];_0x22399e['change'](()=>{const _0x13e225=Array['from'](_0x578f55['getRanges']());for(const _0x2fcf53 of _0x13e225){const _0xb4df91=_0x87b790?[_0x2fcf53]:Rt(_0xa8943c,_0x2fcf53,_0x22399e);for(const _0x10ffce of _0xb4df91)_0x1fa481['markInlineFormat'](_0x10ffce,{'commandName':_0xa8943c,'commandParams':[{'forceValue':_0x87b790}]});}});});}function _0x2a7781(_0x4f26f1,_0x3dc319){_0x1fa481['_descriptionFactory']['registerDescriptionCallback'](_0x2130a7=>{const {data:_0x29d0b4}=_0x2130a7;if(_0x29d0b4&&_0x29d0b4['commandName']===_0x4f26f1)return _0x29d0b4['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Format:*\x20%0',_0x3dc319)}:{'type':'format','content':t('*Remove\x20format:*\x20%0',_0x3dc319)};});}_0x2a7781('bold',t({'string':'bold','id':'FORMAT_BOLD'})),_0x2a7781('italic',t({'string':'italic','id':'FORMAT_ITALIC'})),_0x2a7781('underline',t({'string':'underline','id':'FORMAT_UNDERLINE'})),_0x2a7781('code',t({'string':'code','id':'FORMAT_CODE'})),_0x2a7781('strikethrough',t({'string':'strikethrough','id':'FORMAT_STRIKETHROUGH'})),_0x2a7781('subscript',t({'string':'subscript','id':'FORMAT_SUBSCRIPT'})),_0x2a7781('superscript',t({'string':'superscript','id':'FORMAT_SUPERSCRIPT'}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x2428b6}from'ckeditor5/src/core';import{TreeWalker as Qt}from'ckeditor5/src/engine';export default class F extends _0x2428b6{['afterInit'](){const _0x2d1133=this['editor'],{t:t}=_0x2d1133['locale'];if(!_0x2d1133['plugins']['has']('BlockQuoteEditing'))return;const _0x3dd763=_0x2d1133['plugins']['get']('TrackChangesEditing'),_0x374b84=this['editor']['commands']['get']('blockQuote');_0x3dd763['enableCommand']('blockQuote',(_0x3ba775,_0x4a85cf={})=>{const _0x1383bd=this['editor']['model']['document']['selection'],_0x926244=_0x4a85cf&&void 0x0!==_0x4a85cf['forceValue']?_0x4a85cf['forceValue']:!_0x374b84['value'];let _0x4b2076=[];if(_0x926244){const _0x3914c5=Array['from'](_0x1383bd['getSelectedBlocks']())['filter'](_0x44305e=>Bt(_0x44305e)||function(_0x33816b,_0x5ba982){const _0x415cb1=_0x5ba982['checkChild'](_0x33816b['parent'],'blockQuote'),_0x57a22b=_0x5ba982['checkChild'](['$root','blockQuote'],_0x33816b);return _0x415cb1&&_0x57a22b;}(_0x44305e,this['editor']['model']['schema']));_0x4b2076=Lt(_0x3914c5,_0x2d1133['model']);}else{const _0x4dd3f8=Array['from'](_0x1383bd['getSelectedBlocks']())['filter'](_0x5e9e69=>Bt(_0x5e9e69));_0x4b2076=Lt(_0x4dd3f8,_0x2d1133['model']);}_0x2d1133['model']['change'](()=>{for(const _0x43397a of _0x4b2076)_0x3dd763['markBlockFormat'](_0x43397a,{'commandName':'blockQuote','commandParams':[{'forceValue':_0x926244}]});});}),_0x3dd763['_descriptionFactory']['registerDescriptionCallback'](_0x5246de=>{const {data:_0x281929}=_0x5246de;if(_0x281929&&'blockQuote'==_0x281929['commandName']){const _0x5e6499=t({'string':'block\x20quote','id':'ELEMENT_BLOCK_QUOTE'});return _0x281929['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Format:*\x20%0',_0x5e6499)}:{'type':'format','content':t('*Remove\x20format:*\x20%0',_0x5e6499)};}});}}function Bt(_0x56e217){return'blockQuote'==_0x56e217['parent']['name'];}function Lt(_0x55c772,_0x35f081){let _0x2c4fc5,_0x3be8f6=0x0;const _0x5b50cd=[],_0x48a653=_0x35f081['schema'];for(;_0x3be8f6<_0x55c772['length'];){const _0x3b2d8f=_0x55c772[_0x3be8f6],_0x2d5074=_0x55c772[_0x3be8f6+0x1];_0x2c4fc5||(_0x2c4fc5=_0x35f081['createPositionBefore'](_0x3b2d8f)),Kt(_0x35f081,_0x3b2d8f,_0x2d5074)||(_0x5b50cd['push'](_0x35f081['createRange'](_0x2c4fc5,_0x48a653['isObject'](_0x3b2d8f)?_0x35f081['createPositionAfter'](_0x3b2d8f):_0x35f081['createPositionAt'](_0x3b2d8f,'end'))),_0x2c4fc5=null),_0x3be8f6++;}return _0x5b50cd;}function Kt(_0x8492a1,_0x480eca,_0x175b55){if(!_0x175b55)return!0x1;const _0x1e11c6=_0x8492a1['createPositionAfter'](_0x480eca),_0xeebad9=_0x8492a1['createPositionBefore'](_0x175b55),_0xc8c42c=new Qt({'boundaries':_0x8492a1['createRange'](_0x1e11c6,_0xeebad9)});for(const _0x683156 of _0xc8c42c)if('text'==_0x683156['type']||_0x8492a1['schema']['isLimit'](_0x683156['item']))return!0x1;return!0x0;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5eafff}from'ckeditor5/src/core';export default class L extends _0x5eafff{['afterInit'](){const _0x506a71=this['editor'],{t:t}=_0x506a71['locale'];if(!_0x506a71['plugins']['has']('CodeBlock'))return;_0x506a71['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerElementLabel']('codeBlock',_0x1d8af7=>t({'string':'code\x20block','plural':'%0\x20code\x20blocks','id':'ELEMENT_CODE_BLOCK'},_0x1d8af7));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x15eb=['requires','editor','enableCommand','addCommentThread'];(function(_0x333bf3,_0x15eb6a){var _0x5a8e12=function(_0x41d68e){while(--_0x41d68e){_0x333bf3['push'](_0x333bf3['shift']());}};_0x5a8e12(++_0x15eb6a);}(_0x15eb,0x13b));var _0x5a8e=function(_0x333bf3,_0x15eb6a){_0x333bf3=_0x333bf3-0x0;var _0x5a8e12=_0x15eb[_0x333bf3];return _0x5a8e12;};import{Plugin as _0x7796d3}from'ckeditor5/src/core';import _0x1b2e9f from'@ckeditor/ckeditor5-comments/src/comments/commentsediting';export default class q extends _0x7796d3{static get[_0x5a8e('0x1')](){return[_0x1b2e9f];}['init'](){this[_0x5a8e('0x2')]['plugins']['get']('TrackChangesEditing')[_0x5a8e('0x3')](_0x5a8e('0x0'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x53f1=['model','showSuggestionHighlights','selection','plugins','mapper','init','remove','deleteForward','buffer','getFirstRange','merge','enqueueChange','fromRange','unlock','unit','forward','markerName','get','writer','TrackChangesEditing','unbindElementFromMarkerName','batch','createSelection','commands','document','enableCommand','removeMarker:suggestion:deletion','markerNameToElements','options','lock','start','createRange','editing','end','root','editor','requires','addMarker:suggestion:deletion','high','data','downcastDispatcher','uiElement'];(function(_0x4de929,_0x53f18b){const _0x27cf2d=function(_0x2bf734){while(--_0x2bf734){_0x4de929['push'](_0x4de929['shift']());}};_0x27cf2d(++_0x53f18b);}(_0x53f1,0x1ab));const _0x27cf=function(_0x4de929,_0x53f18b){_0x4de929=_0x4de929-0x0;let _0x27cf2d=_0x53f1[_0x4de929];return _0x27cf2d;};import{Plugin as _0x618d2a}from'ckeditor5/src/core';import{Delete as _0x5189e2}from'ckeditor5/src/typing';import{LiveRange as _0x885cdf}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x3c8539}from'./utils';export default class H extends _0x618d2a{static get[_0x27cf('0x1d')](){return[_0x5189e2];}[_0x27cf('0x28')](){const _0x22b992=this[_0x27cf('0x1c')],_0x18e538=_0x22b992[_0x27cf('0x26')]['get'](_0x27cf('0xc'));_0x18e538[_0x27cf('0x12')]('delete');const _0x34b4c0=_0x22b992[_0x27cf('0x10')][_0x27cf('0xa')](_0x27cf('0x0'));_0x18e538[_0x27cf('0x12')]('deleteForward',(_0x10843a,_0x3086d0={})=>{const _0xdecfeb=_0x22b992[_0x27cf('0x23')][_0x27cf('0xf')](_0x22b992[_0x27cf('0x23')][_0x27cf('0x11')][_0x27cf('0x25')]);_0xdecfeb['isCollapsed']&&_0x22b992['model']['modifySelection'](_0xdecfeb,{'direction':_0x27cf('0x8'),'unit':_0x3086d0[_0x27cf('0x7')]});const _0x33ac4f=_0xdecfeb[_0x27cf('0x2')](),_0x483147=_0x885cdf[_0x27cf('0x5')](_0x33ac4f);let _0x5c6944;_0x10843a(_0x3086d0),_0x5c6944='$graveyard'==_0x483147[_0x27cf('0x1b')]['rootName']?_0x22b992[_0x27cf('0x23')][_0x27cf('0x18')](_0x33ac4f[_0x27cf('0x17')]):_0x22b992[_0x27cf('0x23')][_0x27cf('0x18')](_0x483147[_0x27cf('0x17')],_0x483147[_0x27cf('0x1a')]),_0x483147['detach'](),_0x22b992['model'][_0x27cf('0x4')](_0x34b4c0['buffer'][_0x27cf('0xe')],_0xd45d48=>{_0x34b4c0[_0x27cf('0x1')][_0x27cf('0x16')](),_0xd45d48['setSelection'](_0xd45d48[_0x27cf('0x18')](_0x5c6944[_0x27cf('0x1a')])),_0x34b4c0['buffer'][_0x27cf('0x6')]();});}),_0x22b992[_0x27cf('0x19')]['downcastDispatcher']['on'](_0x27cf('0x1e'),_0x3c8539(_0x22b992,_0x27cf('0x3')),{'priority':_0x27cf('0x1f')}),_0x22b992[_0x27cf('0x20')][_0x27cf('0x21')]['on'](_0x27cf('0x1e'),(_0x455af3,_0x28e91f,_0x5eea45)=>{_0x5eea45[_0x27cf('0x15')][_0x27cf('0x24')]&&_0x3c8539(_0x22b992,_0x27cf('0x3'),{'showActiveMarker':!0x1})(_0x455af3,_0x28e91f,_0x5eea45);},{'priority':_0x27cf('0x1f')}),_0x22b992[_0x27cf('0x19')][_0x27cf('0x21')]['on'](_0x27cf('0x13'),(_0x608095,_0x3b3c13,_0x2d3c0c)=>{const _0x2a8821=_0x2d3c0c[_0x27cf('0x27')][_0x27cf('0x14')](_0x3b3c13[_0x27cf('0x9')]);if(_0x2a8821)for(const _0x2fc9f7 of _0x2a8821)_0x2fc9f7['is'](_0x27cf('0x22'))&&(_0x2d3c0c[_0x27cf('0x27')][_0x27cf('0xd')](_0x2fc9f7,_0x3b3c13[_0x27cf('0x9')]),_0x2d3c0c[_0x27cf('0xb')][_0x27cf('0x29')](_0x2fc9f7));},{'priority':_0x27cf('0x1f')});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x438e=['fromRange','data','markerNameToElements','high','editing','getFirstPosition','createRange','get','mapper','markInsertion','enableCommand','model','createPositionAt','downcastDispatcher','change','schema','addMarker:suggestion:insertion','selection','setSelection','isAtEnd','document','nextSibling','enter','showSuggestionHighlights','removeMarker:suggestion:insertion','TrackChangesEditing','editor','parent','start','isCollapsed','options','detach','requires','end','markerName'];(function(_0x3e76f0,_0x438e61){const _0xe6203c=function(_0x8020b){while(--_0x8020b){_0x3e76f0['push'](_0x3e76f0['shift']());}};_0xe6203c(++_0x438e61);}(_0x438e,0x74));const _0xe620=function(_0x3e76f0,_0x438e61){_0x3e76f0=_0x3e76f0-0x0;let _0xe6203c=_0x438e[_0x3e76f0];return _0xe6203c;};import{Plugin as _0x3f3b1c}from'ckeditor5/src/core';import{Enter as _0x41f2f0}from'ckeditor5/src/enter';import{LiveRange as _0x2c67cb}from'ckeditor5/src/engine';import{downcastSplitMergeMarker as _0x5911a1}from'./utils';export default class W extends _0x3f3b1c{static get[_0xe620('0x15')](){return[_0x41f2f0];}['init'](){const _0x40a28f=this[_0xe620('0xf')],_0x45a860=_0x40a28f['plugins'][_0xe620('0x1f')](_0xe620('0xe'));_0x45a860[_0xe620('0x22')](_0xe620('0xb'),_0x2eef2f=>{_0x40a28f[_0xe620('0x0')][_0xe620('0x3')](_0x82164c=>{const _0x401d6a=_0x40a28f[_0xe620('0x0')][_0xe620('0x9')][_0xe620('0x6')],_0x174fec=_0x401d6a[_0xe620('0x1d')](),_0x1d37bd=_0x401d6a[_0xe620('0x12')],_0x48bb0d=_0x2c67cb[_0xe620('0x18')](_0x401d6a['getFirstRange']()),_0x3fc3fd=_0x48bb0d[_0xe620('0x11')][_0xe620('0x10')],_0x5de719=_0x48bb0d[_0xe620('0x16')][_0xe620('0x10')],_0x18f303=!(_0x48bb0d[_0xe620('0x11')]['isAtStart']&&_0x48bb0d[_0xe620('0x16')][_0xe620('0x8')]),_0x46c041=_0x3fc3fd==_0x5de719,_0x42e416=!(_0x40a28f[_0xe620('0x0')][_0xe620('0x4')]['isLimit'](_0x3fc3fd)||_0x40a28f[_0xe620('0x0')][_0xe620('0x4')]['isLimit'](_0x5de719))&&(_0x1d37bd||_0x18f303&&_0x46c041);if(_0x2eef2f(),_0x42e416){const _0x344142=_0x40a28f['model'][_0xe620('0x1')](_0x174fec[_0xe620('0x10')][_0xe620('0xa')],0x0),_0x244bb3=_0x82164c[_0xe620('0x1e')](_0x174fec,_0x344142);_0x45a860[_0xe620('0x21')](_0x244bb3);}else _0x82164c[_0xe620('0x7')](_0x82164c['createRange'](_0x48bb0d[_0xe620('0x16')]));_0x48bb0d[_0xe620('0x14')]();});}),_0x40a28f[_0xe620('0x1c')][_0xe620('0x2')]['on']('addMarker:suggestion:insertion',_0x5911a1(_0x40a28f,'split'),{'priority':_0xe620('0x1b')}),_0x40a28f[_0xe620('0x1c')]['downcastDispatcher']['on'](_0xe620('0xd'),(_0x3eeaad,_0x15a7ca,_0x3539be)=>{const _0x43386f=_0x3539be[_0xe620('0x20')][_0xe620('0x1a')](_0x15a7ca['markerName']);if(_0x43386f)for(const _0x59a0b5 of _0x43386f)_0x59a0b5['hasClass']('ck-suggestion-marker-split')&&(_0x3539be[_0xe620('0x20')]['unbindElementFromMarkerName'](_0x59a0b5,_0x15a7ca[_0xe620('0x17')]),_0x3539be['writer']['remove'](_0x59a0b5));},{'priority':'high'}),_0x40a28f[_0xe620('0x19')][_0xe620('0x2')]['on'](_0xe620('0x5'),(_0x213959,_0xe622e5,_0x1e7bb5)=>{_0x1e7bb5[_0xe620('0x13')][_0xe620('0xc')]&&_0x5911a1(_0x40a28f,'split',{'showActiveMarker':!0x1})(_0x213959,_0xe622e5,_0x1e7bb5);},{'priority':'high'});}}
|
package/src/integrations/font.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x30d124}from'ckeditor5/src/core';import{normalizeColorOptions as Ht}from'ckeditor5/src/ui';import{normalizeOptions as Jt}from'@ckeditor/ckeditor5-font/src/fontsize/utils';import{getRangesWithAttribute as Rt}from'./utils';const Xt=[{'pluginName':'FontSizeEditing','commandName':'fontSize'},{'pluginName':'FontFamilyEditing','commandName':'fontFamily'},{'pluginName':'FontColorEditing','commandName':'fontColor'},{'pluginName':'FontBackgroundColorEditing','commandName':'fontBackgroundColor'}];export default class z extends _0x30d124{['afterInit'](){const {t:t}=this['editor']['locale'];for(const {pluginName:_0x3e8017,commandName:_0x32397b}of Xt)this['editor']['plugins']['has'](_0x3e8017)&&this['_enableCommand'](_0x32397b);this['editor']['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['registerDescriptionCallback'](_0x8dad3f=>{const {data:_0x57de8e}=_0x8dad3f;if(null!=_0x57de8e){if('fontSize'==_0x57de8e['commandName']){const _0x50d4bc=_0x57de8e['commandParams'][0x0]['value'];if(_0x50d4bc){const _0x5f3130=Jt(this['editor']['config']['get']('fontSize.options'))['find'](_0x2c3bcf=>_0x2c3bcf['model']==_0x50d4bc)['title'],_0x5333ac=this['editor']['locale']['_t'](_0x5f3130)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20size:*\x20%0',_0x5333ac)};}return{'type':'format','content':t('*Reset\x20font\x20size*')};}if('fontFamily'==_0x57de8e['commandName']){const _0x350741=_0x57de8e['commandParams'][0x0]['value'];return _0x350741?{'type':'format','content':t('*Set\x20font\x20family:*\x20%0',_0x350741)}:{'type':'format','content':t('*Reset\x20font\x20family*')};}if('fontColor'==_0x57de8e['commandName']){const _0x58e44d=_0x57de8e['commandParams'][0x0]['value'];if(_0x58e44d){const _0x1235a2=Ht(this['editor']['config']['get']('fontColor.colors'))['find'](_0x79fed0=>_0x79fed0['model']==_0x58e44d)['label'],_0x51313b=this['editor']['locale']['_t'](_0x1235a2)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20color:*\x20%0',_0x51313b)};}return{'type':'format','content':t('*Reset\x20font\x20color*')};}if('fontBackgroundColor'==_0x57de8e['commandName']){const _0x1051c0=_0x57de8e['commandParams'][0x0]['value'];if(_0x1051c0){const _0x6214ec=Ht(this['editor']['config']['get']('fontBackgroundColor.colors'))['find'](_0x38d2b7=>_0x38d2b7['model']==_0x1051c0)['label'],_0x4dc108=this['editor']['locale']['_t'](_0x6214ec)['toLowerCase']();return{'type':'format','content':t('*Set\x20font\x20background\x20color:*\x20%0',_0x4dc108)};}return{'type':'format','content':t('*Reset\x20font\x20background\x20color*')};}}});}['_enableCommand'](_0x47ce3f){const _0x15adf9=this['editor'];_0x15adf9['plugins']['get']('TrackChangesEditing')['enableCommand'](_0x47ce3f,(_0x184071,_0x1e958a={})=>{const _0x11dd1d=_0x15adf9['model']['document']['selection'],_0x255ef5=_0x1e958a['value'];_0x11dd1d['isCollapsed']?_0x184071(_0x1e958a):_0x15adf9['model']['change'](()=>{const _0x565155=Array['from'](_0x11dd1d['getRanges']());for(const _0x161ddd of _0x565155){const _0xa83817=_0x255ef5?[_0x161ddd]:Rt(_0x47ce3f,_0x161ddd,_0x15adf9['model']);for(const _0x4f9d6a of _0xa83817)_0x15adf9['plugins']['get']('TrackChangesEditing')['markInlineFormat'](_0x4f9d6a,{'commandName':_0x47ce3f,'commandParams':[{'value':_0x255ef5}]});}});});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0xc7267a}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0x2cb567}from'./utils';export default class J extends _0xc7267a{['afterInit'](){const _0x1011ec=this['editor'],{t:t}=_0x1011ec['locale'],_0x2dff71=_0x1011ec['config']['get']('heading.options');if(!_0x1011ec['plugins']['has']('HeadingEditing'))return;const _0xe8defa=_0x1011ec['plugins']['get']('TrackChangesEditing');_0xe8defa['enableCommand']('heading',(_0x17d296,_0x30ea3f)=>{const _0x27657d=_0x30ea3f['value'],_0x1c1847=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x33ebc0=>function(_0x2c48ae,_0x25167a,_0x4f6cc8){return _0x4f6cc8['checkChild'](_0x2c48ae['parent'],_0x25167a)&&!_0x4f6cc8['isObject'](_0x2c48ae)&&_0x2c48ae['name']!=_0x25167a;}(_0x33ebc0,_0x27657d,this['editor']['model']['schema']));_0x1011ec['model']['change'](()=>{for(const _0x1957d3 of _0x1c1847)_0xe8defa['markBlockFormat'](_0x1957d3,{'commandName':'heading','commandParams':[_0x30ea3f],'formatGroupId':'blockName'},_0x2cb567(_0x1957d3));});});for(const _0x5ce961 of _0x2dff71)'paragraph'!=_0x5ce961['model']&&_0xe8defa['_descriptionFactory']['registerElementLabel'](_0x5ce961['model'],_0x5915f9=>{const _0x9ae41d=tn(_0x5ce961['model']);return null!==_0x9ae41d?_0x917f5e(_0x5915f9,_0x9ae41d):_0x9e0ba0(_0x5915f9,_0x5ce961['title']);});function _0x917f5e(_0x155956,_0x79144a){return t({'string':'heading\x20(level\x20%1)','plural':'%0\x20headings\x20(level\x20%1)','id':'ELEMENT_HEADING'},[_0x155956,_0x79144a]);}function _0x9e0ba0(_0x4de638,_0x542754){return t({'string':'heading\x20(%1)','plural':'%0\x20headings\x20(%1)','id':'ELEMENT_HEADING_CUSTOM'},[_0x4de638,_0x542754]);}_0xe8defa['_descriptionFactory']['registerDescriptionCallback'](_0x35197c=>{const {type:_0x57517c,data:_0x510bfb}=_0x35197c;if('formatBlock'==_0x57517c&&_0x510bfb&&'heading'==_0x510bfb['commandName']){const _0x4d737d=_0x510bfb['commandParams'][0x0]['value'],_0x179ac2=tn(_0x4d737d);if(null!==_0x179ac2)return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x917f5e(0x1,_0x179ac2))};const _0xf122c0=_0x2dff71['find'](_0x5ded63=>_0x5ded63['model']===_0x4d737d)['title'];return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x9e0ba0(0x1,_0xf122c0))};}});}}function tn(_0x449f87){const _0x26fc21=_0x449f87['match'](/^heading(\d+)$/);return _0x26fc21?_0x26fc21[0x1]:null;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x46b9a9}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class K extends _0x46b9a9{['afterInit'](){const _0x2b7d63=this['editor'];if(!_0x2b7d63['plugins']['has']('HighlightEditing'))return;const _0xc953d=_0x2b7d63['plugins']['get']('TrackChangesEditing');_0xc953d['enableCommand']('highlight',(_0x4dcc73,_0x237315={})=>{const _0xaa2546=_0x2b7d63['model']['document']['selection'],_0x2167ec=_0xaa2546['getAttribute']('highlight');let _0x2dd738=_0x237315['value'],_0x2a8ca1=[];if(_0xaa2546['isCollapsed']){const _0x254a2a=_0xaa2546['getFirstPosition']();if(!_0xaa2546['hasAttribute']('highlight'))return void _0x4dcc73(_0x237315);{const _0x1dc867=_0x2ccc51=>_0x2ccc51['item']['getAttribute']('highlight')===_0x2167ec,_0xfea797=_0x254a2a['getLastMatchingPosition'](_0x1dc867,{'direction':'backward'}),_0x242f08=_0x254a2a['getLastMatchingPosition'](_0x1dc867);_0x2a8ca1=[_0x2b7d63['model']['createRange'](_0xfea797,_0x242f08)],_0x2dd738==_0x2167ec&&(_0x2dd738=null);}}else for(const _0x52e3f7 of _0xaa2546['getRanges']())_0x2dd738?_0x2a8ca1['push'](_0x52e3f7):_0x2a8ca1['push'](...Rt('highlight',_0x52e3f7,_0x2b7d63['model']));_0x2b7d63['model']['change'](()=>{for(const _0x44d285 of _0x2a8ca1)_0xc953d['markInlineFormat'](_0x44d285,{'commandName':'highlight','commandParams':[{'value':_0x2dd738}]});});});const {t:t}=_0x2b7d63['locale'];_0xc953d['_descriptionFactory']['registerDescriptionCallback'](_0x5ce659=>{const {type:_0x4b9252,data:_0x4eccbb}=_0x5ce659;if('formatInline'==_0x4b9252&&_0x4eccbb&&'highlight'==_0x4eccbb['commandName']){const _0x1fc792=_0x4eccbb['commandParams'][0x0]['value'];if(_0x1fc792){const _0x551bdc=_0x2b7d63['config']['get']('highlight.options')['find'](_0x1bc3f3=>_0x1bc3f3['model']==_0x1fc792)['title'],_0x4bfb25=_0x2b7d63['locale']['_t'](_0x551bdc)['toLowerCase']();return{'type':'format','content':t('*Format:*\x20%0',t({'string':'%0\x20highlight','id':'FORMAT_CUSTOM_HIGHLIGHT'},_0x4bfb25))};}return{'type':'format','content':t('*Remove\x20format:*\x20%0',t({'string':'highlight','id':'FORMAT_HIGHLIGHT'}))};}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x392bba}from'ckeditor5/src/core';import'../../theme/integrations/horizontalline.css';export default class Q extends _0x392bba{['afterInit'](){const _0x236927=this['editor'];if(!_0x236927['plugins']['has']('HorizontalLineEditing'))return;_0x236927['plugins']['get']('TrackChangesEditing')['enableCommand']('horizontalLine');const _0xdbdb7=_0x236927['plugins']['get']('TrackChangesEditing'),{t:t}=_0x236927['locale'];_0xdbdb7['_descriptionFactory']['registerElementLabel']('horizontalLine',_0x19b34a=>t({'string':'horizontal\x20line','plural':'%0\x20horizontal\x20lines','id':'ELEMENT_HORIZONTAL_LINE'},_0x19b34a)),_0x236927['conversion']['for']('dataDowncast')['elementToElement']({'model':'horizontalLine','view':(_0x11140e,{writer:_0x46f3d4,options:_0x2eb381})=>{if(!_0x2eb381['showSuggestionHighlights'])return;const _0x263917=_0x46f3d4['createContainerElement']('div'),_0x3ff531=_0x46f3d4['createEmptyElement']('hr');return _0x46f3d4['addClass']('ck-horizontal-line',_0x263917),_0x46f3d4['insert'](_0x46f3d4['createPositionAt'](_0x263917,0x0),_0x3ff531),_0x263917;},'converterPriority':'high'});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x393f07}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x1db41b}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x1ad087}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class Y extends _0x393f07{['afterInit'](){const _0x289b82=this['editor'];if(!_0x289b82['plugins']['has']('ImageEditing'))return;const _0x2b21c0=_0x289b82['plugins']['get']('TrackChangesEditing'),_0x4c293b=_0x289b82['plugins']['get']('ImageUtils'),_0x1aac9e={},{t:t}=_0x289b82['locale'];if(_0x2b21c0['enableCommand']('insertImage'),_0x2b21c0['_descriptionFactory']['registerElementLabel']('imageBlock',_0x184e31=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x184e31)),_0x2b21c0['_descriptionFactory']['registerElementLabel']('imageInline',_0x58759e=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x58759e)),_0x2b21c0['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0x289b82['plugins']['has']('ImageUploadEditing')&&_0x2b21c0['enableCommand']('uploadImage'),_0x289b82['plugins']['has']('ImageBlockEditing')&&_0x289b82['plugins']['has']('ImageInlineEditing')&&(_0x2b21c0['enableCommand']('imageTypeInline',(_0x562c72,_0x54223e)=>{const _0x530602=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']);_0x289b82['model']['change'](()=>{_0x2b21c0['markBlockFormat'](_0x530602,{'commandName':'imageTypeInline','commandParams':[_0x54223e]},[],'convertBlockImageToInline');});}),_0x2b21c0['enableCommand']('imageTypeBlock',(_0x5c35fd,_0x171a4c)=>{_0x289b82['model']['change'](_0x207bd0=>{let _0x13d192=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x4af63a=_0x207bd0['createRangeOn'](_0x13d192);const _0x39c004=te['fromPosition'](_0x4af63a['start'],'toPrevious'),_0x54c799=te['fromPosition'](_0x4af63a['end'],'toNext');_0x2b21c0['forceDefaultExecution'](()=>_0x5c35fd(_0x171a4c)),_0x13d192=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x4af63a=_0x207bd0['createRangeOn'](_0x13d192);const _0x4f3153=_0x207bd0['createRange'](_0x39c004,_0x54c799);_0x39c004['detach'](),_0x54c799['detach'](),_0x2b21c0['markBlockFormat'](_0x13d192,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x4f3153['start']['isBefore'](_0x4af63a['start'])&&_0x2b21c0['markInsertion'](_0x207bd0['createRange'](_0x4f3153['start'],_0x4af63a['start']),'convertInlineImageToBlock'),_0x4af63a['end']['isBefore'](_0x4f3153['end'])&&_0x2b21c0['markInsertion'](_0x207bd0['createRange'](_0x4af63a['end'],_0x4f3153['end']),'convertInlineImageToBlock');});}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x2b21c0['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x2f898f])=>{const _0x65a105=_0x2b21c0['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x533600=_0x2f898f['start'],_0x11f943=_0x2f898f['end'];const _0x25e12d=_0x289b82['model']['schema']['getNearestSelectionRange'](_0x533600,'backward'),_0x57e673=_0x289b82['model']['schema']['getNearestSelectionRange'](_0x11f943,'forward');_0x25e12d['isCollapsed']&&(_0x533600=_0x25e12d['start']),_0x57e673['isCollapsed']&&(_0x11f943=_0x57e673['end']),_0x65a105([_0x289b82['model']['createRange'](_0x533600,_0x11f943)]);}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0xce1abd),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0xce1abd)),_0x289b82['plugins']['has']('ImageCaptionEditing')&&(_0x2b21c0['enableCommand']('toggleImageCaption',(_0x301b9a,_0x3a394d)=>{let _0x367244=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x40af52=_0x1ad087(_0x367244);_0x289b82['model']['change'](()=>{if(_0x40af52)return void _0x2b21c0['markDeletion'](_0x289b82['model']['createRangeOn'](_0x40af52));const _0x1a7ed0=_0x4c293b['isBlockImage'](_0x367244);_0x301b9a(_0x3a394d),_0x367244=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x40af52=_0x1ad087(_0x367244),_0x2b21c0['markInsertion'](_0x289b82['model']['createRangeOn'](_0x40af52),_0x1a7ed0?null:'imageCaption');});}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0xce1abd)),_0x289b82['plugins']['has']('ImageStyleEditing')){_0x2b21c0['enableCommand']('imageStyle',(_0x2ca95d,_0x49c7ee)=>{const _0x2806d1=_0x289b82['plugins']['get']('Users')['me'],_0x441f3c=_0x289b82['commands']['get']('imageStyle');let _0x58febf=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x1d892a=_0x289b82['model']['createRangeOn'](_0x58febf),_0x2d489e=_0x441f3c['value'];if(_0x2d489e==_0x49c7ee['value'])return;const _0x36f080={'commandName':'imageStyle','commandParams':[_0x49c7ee],'formatGroupId':_0x1db41b()};_0x289b82['model']['change'](()=>{if(_0x2b21c0['getSuggestions']()['filter'](_0x39259e=>_0x39259e['isInContent']&&_0x2806d1==_0x39259e['author']&&('formatBlock'==_0x39259e['type']||'formatInline'==_0x39259e['type'])&&('imageStylePreApply'==_0x39259e['subType']||'imageStylePostApply'==_0x39259e['subType'])&&_0x39259e['getFirstRange']()['isEqual'](_0x1d892a))['forEach'](_0x346f80=>_0x2b21c0['discardSuggestion'](_0x346f80['head'])),_0x58febf=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),_0x1d892a=_0x289b82['model']['createRangeOn'](_0x58febf),_0x441f3c['refresh'](),_0x289b82['commands']['get']('imageTypeInline')['refresh'](),_0x289b82['commands']['get']('imageTypeBlock')['refresh'](),_0x2d489e=_0x441f3c['value'],_0x2d489e!=_0x49c7ee['value'])return _0x4c293b['isInlineImage'](_0x58febf)&&_0x441f3c['shouldConvertImageType'](_0x49c7ee['value'],_0x58febf)?(_0x2ca95d(_0x49c7ee),_0x58febf=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']),void _0x2b21c0['markBlockFormat'](_0x58febf,{..._0x36f080,'commandReversedParams':[{'value':_0x2d489e||null}]},[],'imageStylePreApply')):void(_0x4c293b['isBlockImage'](_0x58febf)?_0x2b21c0['markBlockFormat'](_0x58febf,_0x36f080,[],'imageStylePostApply'):_0x2b21c0['markInlineFormat'](_0x1d892a,_0x36f080,'imageStylePostApply'));});});for(const _0x57e3bc of _0x289b82['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x1aac9e[_0x57e3bc['name']]=_0x57e3bc['title']['toLowerCase']();_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x4b83f2,_0x3c59d7)=>{_0x2b21c0['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x4b83f2,{'commandName':_0x3c59d7['commandName'],'commandParams':_0x3c59d7['commandReversedParams']});}),_0x2b21c0['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0xce1abd);}const _0x5a474f=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x2d600f(_0x425921,_0x2c45d5){const _0x55eb0d=_0x5a474f['findIndex'](({type:_0x38eafe,subType:_0x3e7029})=>_0x425921['type']==_0x38eafe&&_0x425921['subType']==_0x3e7029),_0x1a592d=_0x5a474f['findIndex'](({type:_0x4eecd5,subType:_0x3bb2ff})=>_0x2c45d5['type']==_0x4eecd5&&_0x2c45d5['subType']==_0x3bb2ff);if(_0x55eb0d<0x0||_0x1a592d<0x0)return!0x1;const _0x3d0f27=_0x425921['getFirstRange'](),_0x4eeffb=_0x2c45d5['getFirstRange']();if((0x0==_0x55eb0d||0x1==_0x55eb0d)&&0x2==_0x1a592d&&_0x3d0f27['isIntersecting'](_0x4eeffb))return!0x0;if(0x2==_0x55eb0d&&0x3==_0x1a592d){const _0x1ed204=_0x2b21c0['_findSuggestions'](_0x3d0f27,'insertion')['filter'](({suggestion:_0x1a5d41,meta:_0x4fde8b})=>_0x4fde8b['isOwn']&&'convertInlineImageToBlock'==_0x1a5d41['subType']);if(_0x1ed204['length']>0x1&&_0x4eeffb['end']['isEqual'](_0x3d0f27['start']))return!0x0;if(0x1==_0x1ed204['length']&&(_0x3d0f27['start']['isEqual'](_0x4eeffb['end'])||_0x3d0f27['end']['isEqual'](_0x4eeffb['start'])))return!0x0;}if(0x3==_0x55eb0d&&0x3==_0x1a592d&&_0x3d0f27['start']['isBefore'](_0x4eeffb['start'])){const _0x2c224f=_0x3d0f27['end']['nodeAfter'],_0x52fba7=_0x4eeffb['start']['nodeBefore'];return _0x4c293b['isBlockImage'](_0x2c224f)&&_0x2c224f===_0x52fba7;}return!0x1;}function _0xce1abd(_0x33047d,_0x16156e){return _0x2d600f(_0x33047d,_0x16156e)?[_0x33047d,_0x16156e]:_0x2d600f(_0x16156e,_0x33047d)?[_0x16156e,_0x33047d]:null;}_0x289b82['model']['document']['registerPostFixer'](()=>{let _0x4e2ec4=!0x1;const _0x56bfca=Array['from'](_0x289b82['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x4812c7,data:_0x237ebb}of _0x56bfca){const {group:_0x1ac7cb,type:_0x22d531,subType:_0x9687ae,id:_0x218e11}=_0x2b21c0['_splitMarkerName'](_0x4812c7);if('suggestion'==_0x1ac7cb&&_0x2b21c0['hasSuggestion'](_0x218e11)){if('formatBlock'==_0x22d531&&('imageStylePreApply'==_0x9687ae||'imageStylePostApply'==_0x9687ae)){const _0x546ea1=_0x2b21c0['getSuggestion'](_0x218e11);if(_0x237ebb['newRange']){const _0x1e7770=_0x546ea1['getFirstRange']()['getContainedElement']();if(_0x4c293b['isBlockImage'](_0x1e7770))continue;_0x2b21c0['discardSuggestion'](_0x546ea1),_0x4e2ec4=!0x0;}}if('insertion'==_0x22d531&&'imageCaption'==_0x9687ae&&!_0x237ebb['newRange']){const _0x1fc055=_0x2b21c0['getSuggestion'](_0x218e11);_0x1fc055['next']&&_0x1fc055['next']['isInContent']&&(_0x2b21c0['discardSuggestion'](_0x1fc055['next']),_0x4e2ec4=!0x0);}}}return _0x4e2ec4;}),_0x289b82['plugins']['has']('ImageResize')&&_0x2b21c0['enableCommand']('resizeImage',(_0x1bf660,_0x4522e5)=>{const _0xe434aa=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']);_0xe434aa['getAttribute']('width')!=_0x4522e5['width']&&_0x289b82['model']['change'](()=>{_0x2b21c0['markBlockFormat'](_0xe434aa,{'commandName':'resizeImage','commandParams':[_0x4522e5]});});}),_0x289b82['plugins']['has']('ImageTextAlternativeEditing')&&_0x2b21c0['enableCommand']('imageTextAlternative',(_0x2cd755,_0x5cee51)=>{const _0x30ccc6=_0x4c293b['getClosestSelectedImageElement'](_0x289b82['model']['document']['selection']);(_0x30ccc6['hasAttribute']('alt')?_0x30ccc6['getAttribute']('alt'):'')!=_0x5cee51['newValue']&&_0x289b82['model']['change'](()=>{_0x2b21c0['markBlockFormat'](_0x30ccc6,{'commandName':'imageTextAlternative','commandParams':[_0x5cee51]});});}),_0x2b21c0['_descriptionFactory']['registerDescriptionCallback'](_0x2acbf7=>{if(!!_0x5a474f['find'](({type:_0x5a4597,subType:_0x447e02})=>_0x2acbf7['type']==_0x5a4597&&_0x2acbf7['subType']==_0x447e02))return _0x2acbf7['previous']?{}:void 0x0;}),_0x2b21c0['_descriptionFactory']['registerDescriptionCallback'](_0x4dc2d3=>{if('insertion'==_0x4dc2d3['type']||'deletion'==_0x4dc2d3['type']){const _0x4d91ee=_0x4dc2d3['getContainedElement']();if(_0x4d91ee&&_0x4d91ee['is']('element','caption'))return{'type':'insertion'==_0x4dc2d3['type']?'addObject':'removeObject','name':_0x4d91ee['name'],'quantity':0x1};}}),_0x2b21c0['_descriptionFactory']['registerDescriptionCallback'](_0x9a10e=>'formatBlock'==_0x9a10e['type']&&'convertInlineImageToBlock'==_0x9a10e['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x9a10e['type']&&'convertBlockImageToInline'==_0x9a10e['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x2b21c0['_descriptionFactory']['registerDescriptionCallback'](_0x35a7a2=>{const {data:_0x329709}=_0x35a7a2;if(_0x329709){if('imageStyle'==_0x329709['commandName']){const _0x390626=_0x329709['commandParams'][0x0]['value'];return _0x3cddae('side'===_0x390626?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x1aac9e[_0x390626]||_0x390626);}if('imageTextAlternative'==_0x329709['commandName']){const _0x4bc726=_0x329709['commandParams'][0x0]['newValue'];return _0x4bc726?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x4bc726+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x329709['commandName']){const _0x57180d=_0x329709['commandParams'][0x0]['width'];return _0x57180d?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x57180d)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x3cddae(_0x512d0d){return{'type':'format','content':t('*Format:*\x20%0',_0x512d0d)};}});}}
|
|
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)};}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5556de}from'ckeditor5/src/core';export default class X extends _0x5556de{['afterInit'](){const _0xb8e84c=this['editor'],_0x4a1cd1=_0xb8e84c['plugins']['get']('TrackChangesEditing');_0xb8e84c['plugins']['has']('IndentEditing')&&(_0x4a1cd1['enableCommand']('indent'),_0x4a1cd1['enableCommand']('outdent'));const {t:t}=_0xb8e84c['locale'];if(_0xb8e84c['plugins']['has']('IndentBlock')){for(const _0x578c95 of['indentBlock','outdentBlock'])_0x4a1cd1['enableCommand'](_0x578c95,()=>{const _0xfd3a=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x1afd56=>this['editor']['model']['schema']['checkAttribute'](_0x1afd56,'blockIndent'));_0xb8e84c['model']['change'](()=>{for(const _0x1afb28 of _0xfd3a)_0x4a1cd1['markBlockFormat'](_0x1afb28,{'commandName':_0x578c95,'commandParams':[{'value':''}],'formatGroupId':'indentBlock'});});});_0x4a1cd1['_descriptionFactory']['registerDescriptionCallback'](_0x1d03c0=>{const {data:_0x67369c}=_0x1d03c0;if(!_0x67369c)return;if('indentBlock'!=_0x67369c['commandName']&&'outdentBlock'!=_0x67369c['commandName'])return;const _0x4c285c=_0x1d03c0['getItems']()[0x0],_0x2364c4=_0x4a1cd1['_descriptionFactory']['getItemLabel'](_0x4c285c['name']);return'indentBlock'==_0x67369c['commandName']?{'type':'format','content':t('*Indent:*\x20%0',_0x2364c4)}:'outdentBlock'==_0x67369c['commandName']?{'type':'format','content':t('*Outdent:*\x20%0',_0x2364c4)}:void 0x0;});}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5705=['requires','editor','plugins','TrackChangesEditing','enableCommand','get'];(function(_0x25cfe2,_0x570589){var _0x48fc09=function(_0x14d166){while(--_0x14d166){_0x25cfe2['push'](_0x25cfe2['shift']());}};_0x48fc09(++_0x570589);}(_0x5705,0x102));var _0x48fc=function(_0x25cfe2,_0x570589){_0x25cfe2=_0x25cfe2-0x0;var _0x48fc09=_0x5705[_0x25cfe2];return _0x48fc09;};import{Plugin as _0x2829b5}from'ckeditor5/src/core';import{Input as _0xa97059}from'ckeditor5/src/typing';export default class Y extends _0x2829b5{static get[_0x48fc('0x0')](){return[_0xa97059];}['init'](){this[_0x48fc('0x1')][_0x48fc('0x2')][_0x48fc('0x5')](_0x48fc('0x3'))[_0x48fc('0x4')]('input');}}
|
package/src/integrations/link.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x349d4c}from'ckeditor5/src/core';import{findAttributeRange as _0x2200ab}from'ckeditor5/src/typing';import{getRangesWithAttribute as Rt}from'./utils';export default class Z extends _0x349d4c{['afterInit'](){const _0xc463a6=this['editor'];if(!_0xc463a6['plugins']['has']('LinkEditing'))return;const _0x436836=_0xc463a6['plugins']['get']('TrackChangesEditing');_0x436836['enableCommand']('link',(_0x396535,_0x56a285)=>{const _0x3637d7=_0xc463a6['model']['document']['selection'];let _0x542138=[];if(_0x3637d7['isCollapsed']){if(!_0x3637d7['hasAttribute']('linkHref'))return void _0x396535(_0x56a285);{const _0x2fd539=_0x2200ab(_0x3637d7['getFirstPosition'](),'linkHref',_0x3637d7['getAttribute']('linkHref'),_0xc463a6['model']);_0x542138=[_0x2fd539];}}else _0x542138=Array['from'](_0x3637d7['getRanges']());_0xc463a6['model']['change'](()=>{for(const _0x5e954c of _0x542138)_0x436836['markInlineFormat'](_0x5e954c,{'commandName':'link','commandParams':[_0x56a285]});});}),_0x436836['enableCommand']('unlink',()=>{const _0x1daef9=this['editor']['model'],_0x2bef21=_0x1daef9['document']['selection'];_0x1daef9['change'](()=>{let _0x4591dc=[];if(_0x2bef21['isCollapsed'])_0x4591dc=[_0x2200ab(_0x2bef21['getFirstPosition'](),'linkHref',_0x2bef21['getAttribute']('linkHref'),_0xc463a6['model'])];else _0x4591dc=Rt('linkHref',_0x2bef21['getFirstRange'](),_0xc463a6['model']);for(const _0x3fae35 of _0x4591dc)_0x436836['markInlineFormat'](_0x3fae35,{'commandName':'unlink','commandParams':[]});});}),_0x436836['_descriptionFactory']['registerDescriptionCallback'](_0x3b0be2=>{const {data:_0x152aed}=_0x3b0be2,{t:t}=_0xc463a6['locale'];if(_0x152aed){if('link'==_0x152aed['commandName'])return{'type':'format','content':t('*Set\x20link:*\x20%0','\x22'+_0x152aed['commandParams'][0x0]+'\x22')};return'unlink'==_0x152aed['commandName']?{'type':'format','content':t('*Remove\x20link*')}:void 0x0;}});}}
|