@ckeditor/ckeditor5-track-changes 29.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/lang/translations/de.po +3 -3
- package/lang/translations/gl.po +3 -3
- package/lang/translations/it.po +3 -3
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- 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/theme/integrations/table.css +57 -48
- package/theme/suggestionmarker.css +1 -0
- package/src/integrations/exportpdf.js +0 -23
- package/src/integrations/selectall.js +0 -23
package/lang/translations/de.po
CHANGED
|
@@ -201,12 +201,12 @@ msgstr[1] "%0 Bilder"
|
|
|
201
201
|
msgctxt "The inline image element name displayed in the suggestion."
|
|
202
202
|
msgid "ELEMENT_INLINE_IMAGE"
|
|
203
203
|
msgid_plural "%0 images"
|
|
204
|
-
msgstr[0] ""
|
|
205
|
-
msgstr[1] ""
|
|
204
|
+
msgstr[0] "Bildunterschrift"
|
|
205
|
+
msgstr[1] "%0 Bilder"
|
|
206
206
|
|
|
207
207
|
msgctxt "The caption element name displayed in the suggestion."
|
|
208
208
|
msgid "ELEMENT_CAPTION"
|
|
209
|
-
msgstr ""
|
|
209
|
+
msgstr "Bildunterschrift"
|
|
210
210
|
|
|
211
211
|
msgctxt "The line break element name displayed in the suggestion."
|
|
212
212
|
msgid "ELEMENT_LINE_BREAK"
|
package/lang/translations/gl.po
CHANGED
|
@@ -201,12 +201,12 @@ msgstr[1] "%0 imaxes"
|
|
|
201
201
|
msgctxt "The inline image element name displayed in the suggestion."
|
|
202
202
|
msgid "ELEMENT_INLINE_IMAGE"
|
|
203
203
|
msgid_plural "%0 images"
|
|
204
|
-
msgstr[0] ""
|
|
205
|
-
msgstr[1] ""
|
|
204
|
+
msgstr[0] "imaxe"
|
|
205
|
+
msgstr[1] "%0 imaxes"
|
|
206
206
|
|
|
207
207
|
msgctxt "The caption element name displayed in the suggestion."
|
|
208
208
|
msgid "ELEMENT_CAPTION"
|
|
209
|
-
msgstr ""
|
|
209
|
+
msgstr "lenda"
|
|
210
210
|
|
|
211
211
|
msgctxt "The line break element name displayed in the suggestion."
|
|
212
212
|
msgid "ELEMENT_LINE_BREAK"
|
package/lang/translations/it.po
CHANGED
|
@@ -201,12 +201,12 @@ msgstr[1] "%0 immagini"
|
|
|
201
201
|
msgctxt "The inline image element name displayed in the suggestion."
|
|
202
202
|
msgid "ELEMENT_INLINE_IMAGE"
|
|
203
203
|
msgid_plural "%0 images"
|
|
204
|
-
msgstr[0] ""
|
|
205
|
-
msgstr[1] ""
|
|
204
|
+
msgstr[0] "immagine"
|
|
205
|
+
msgstr[1] "%0 immagini"
|
|
206
206
|
|
|
207
207
|
msgctxt "The caption element name displayed in the suggestion."
|
|
208
208
|
msgid "ELEMENT_CAPTION"
|
|
209
|
-
msgstr ""
|
|
209
|
+
msgstr "didascalia"
|
|
210
210
|
|
|
211
211
|
msgctxt "The line break element name displayed in the suggestion."
|
|
212
212
|
msgid "ELEMENT_LINE_BREAK"
|
|
@@ -212,7 +212,7 @@ msgstr[2] ""
|
|
|
212
212
|
|
|
213
213
|
msgctxt "The caption element name displayed in the suggestion."
|
|
214
214
|
msgid "ELEMENT_CAPTION"
|
|
215
|
-
msgstr ""
|
|
215
|
+
msgstr "Naslov"
|
|
216
216
|
|
|
217
217
|
msgctxt "The line break element name displayed in the suggestion."
|
|
218
218
|
msgid "ELEMENT_LINE_BREAK"
|
package/lang/translations/sr.po
CHANGED
|
@@ -212,7 +212,7 @@ msgstr[2] ""
|
|
|
212
212
|
|
|
213
213
|
msgctxt "The caption element name displayed in the suggestion."
|
|
214
214
|
msgid "ELEMENT_CAPTION"
|
|
215
|
-
msgstr ""
|
|
215
|
+
msgstr "Наслов"
|
|
216
216
|
|
|
217
217
|
msgctxt "The line break element name displayed in the suggestion."
|
|
218
218
|
msgid "ELEMENT_LINE_BREAK"
|
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 _0x2447bf}from'ckeditor5/src/core';import{LivePosition as te}from'ckeditor5/src/engine';import{uid as _0x8e5dae}from'ckeditor5/src/utils';import{getCaptionFromImageModelElement as _0x520bcc}from'@ckeditor/ckeditor5-image/src/imagecaption/utils';import'../../theme/integrations/image.css';export default class X extends _0x2447bf{['afterInit'](){const _0xe92450=this['editor'];if(!_0xe92450['plugins']['has']('ImageEditing'))return;const _0x1d5ede=_0xe92450['plugins']['get']('TrackChangesEditing'),_0x53d5aa=_0xe92450['plugins']['get']('ImageUtils'),_0x2fda02={},{t:t}=_0xe92450['locale'];if(_0x1d5ede['enableCommand']('insertImage'),_0x1d5ede['_descriptionFactory']['registerElementLabel']('imageBlock',_0x2cbcc1=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_IMAGE'},_0x2cbcc1)),_0x1d5ede['_descriptionFactory']['registerElementLabel']('imageInline',_0x4118c7=>t({'string':'image','plural':'%0\x20images','id':'ELEMENT_INLINE_IMAGE'},_0x4118c7)),_0x1d5ede['_descriptionFactory']['registerElementLabel']('caption',t({'string':'caption','id':'ELEMENT_CAPTION'})),_0xe92450['plugins']['has']('ImageUploadEditing')&&_0x1d5ede['enableCommand']('uploadImage'),_0xe92450['plugins']['has']('ImageBlockEditing')&&_0xe92450['plugins']['has']('ImageInlineEditing')&&(_0x1d5ede['enableCommand']('imageTypeInline',(_0x4f2820,_0x576177)=>{const _0x442ede=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']);_0xe92450['model']['change'](()=>{_0x1d5ede['markBlockFormat'](_0x442ede,{'commandName':'imageTypeInline','commandParams':[_0x576177]},[],'convertBlockImageToInline');});}),_0x1d5ede['enableCommand']('imageTypeBlock',(_0x3862ed,_0x5ba76b)=>{_0xe92450['model']['change'](_0xddffc7=>{let _0x37de6f=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x1b3e97=_0xddffc7['createRangeOn'](_0x37de6f);const _0x2e8545=te['fromPosition'](_0x1b3e97['start'],'toPrevious'),_0x54cb98=te['fromPosition'](_0x1b3e97['end'],'toNext');_0x1d5ede['forceDefaultExecution'](()=>_0x3862ed(_0x5ba76b)),_0x37de6f=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x1b3e97=_0xddffc7['createRangeOn'](_0x37de6f);const _0x37d49a=_0xddffc7['createRange'](_0x2e8545,_0x54cb98);_0x2e8545['detach'](),_0x54cb98['detach'](),_0x1d5ede['markBlockFormat'](_0x37de6f,{'commandName':'imageTypeInline'},[],'convertInlineImageToBlock'),_0x37d49a['start']['isBefore'](_0x1b3e97['start'])&&_0x1d5ede['markInsertion'](_0xddffc7['createRange'](_0x37d49a['start'],_0x1b3e97['start']),'convertInlineImageToBlock'),_0x1b3e97['end']['isBefore'](_0x37d49a['end'])&&_0x1d5ede['markInsertion'](_0xddffc7['createRange'](_0x1b3e97['end'],_0x37d49a['end']),'convertInlineImageToBlock');});}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','join',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','accept',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','discard',_0x1d5ede['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','join',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','discard',([_0x3296ee])=>{const _0x56a69e=_0x1d5ede['_suggestionFactory']['getSuggestionCallback']('insertion','','discard');let _0x16959b=_0x3296ee['start'],_0xd59d17=_0x3296ee['end'];const _0x3f281c=_0xe92450['model']['schema']['getNearestSelectionRange'](_0x16959b,'backward'),_0x1a40ad=_0xe92450['model']['schema']['getNearestSelectionRange'](_0xd59d17,'forward');_0x3f281c['isCollapsed']&&(_0x16959b=_0x3f281c['start']),_0x1a40ad['isCollapsed']&&(_0xd59d17=_0x1a40ad['end']),_0x56a69e([_0xe92450['model']['createRange'](_0x16959b,_0xd59d17)]);}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','convertInlineImageToBlock','chain',_0x31a07d),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('insertion','convertInlineImageToBlock','chain',_0x31a07d)),_0xe92450['plugins']['has']('ImageCaptionEditing')&&(_0x1d5ede['enableCommand']('toggleImageCaption',(_0x580cc9,_0x33929c)=>{let _0x57777c=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x36c394=_0x520bcc(_0x57777c);_0xe92450['model']['change'](()=>{if(_0x36c394)return void _0x1d5ede['markDeletion'](_0xe92450['model']['createRangeOn'](_0x36c394));const _0x584906=_0x53d5aa['isBlockImage'](_0x57777c);_0x580cc9(_0x33929c),_0x57777c=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x36c394=_0x520bcc(_0x57777c),_0x1d5ede['markInsertion'](_0xe92450['model']['createRangeOn'](_0x36c394),_0x584906?null:'imageCaption');});}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('insertion','imageCaption','chain',_0x31a07d)),_0xe92450['plugins']['has']('ImageStyleEditing')){_0x1d5ede['enableCommand']('imageStyle',(_0x22d27e,_0xbac2c7)=>{const _0x1957f4=_0xe92450['plugins']['get']('Users')['me'],_0x46aa4e=_0xe92450['commands']['get']('imageStyle');let _0x4044c2=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x5b60fe=_0xe92450['model']['createRangeOn'](_0x4044c2),_0x12eef0=_0x46aa4e['value'];if(_0x12eef0==_0xbac2c7['value'])return;const _0x3382a0={'commandName':'imageStyle','commandParams':[_0xbac2c7],'formatGroupId':_0x8e5dae()};_0xe92450['model']['change'](()=>{if(_0x1d5ede['getSuggestions']()['filter'](_0x4f2aa9=>_0x4f2aa9['isInContent']&&_0x1957f4==_0x4f2aa9['author']&&('formatBlock'==_0x4f2aa9['type']||'formatInline'==_0x4f2aa9['type'])&&('imageStylePreApply'==_0x4f2aa9['subType']||'imageStylePostApply'==_0x4f2aa9['subType'])&&_0x4f2aa9['getFirstRange']()['isEqual'](_0x5b60fe))['forEach'](_0x53d4b9=>_0x1d5ede['discardSuggestion'](_0x53d4b9['head'])),_0x4044c2=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),_0x5b60fe=_0xe92450['model']['createRangeOn'](_0x4044c2),_0x46aa4e['refresh'](),_0xe92450['commands']['get']('imageTypeInline')['refresh'](),_0xe92450['commands']['get']('imageTypeBlock')['refresh'](),_0x12eef0=_0x46aa4e['value'],_0x12eef0!=_0xbac2c7['value'])return _0x53d5aa['isInlineImage'](_0x4044c2)&&_0x46aa4e['shouldConvertImageType'](_0xbac2c7['value'],_0x4044c2)?(_0x22d27e(_0xbac2c7),_0x4044c2=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']),void _0x1d5ede['markBlockFormat'](_0x4044c2,{..._0x3382a0,'commandReversedParams':[{'value':_0x12eef0||null}]},[],'imageStylePreApply')):void(_0x53d5aa['isBlockImage'](_0x4044c2)?_0x1d5ede['markBlockFormat'](_0x4044c2,_0x3382a0,[],'imageStylePostApply'):_0x1d5ede['markInlineFormat'](_0x5b60fe,_0x3382a0,'imageStylePostApply'));});});for(const _0x29c84b of _0xe92450['plugins']['get']('ImageStyleEditing')['normalizedStyles'])_0x2fda02[_0x29c84b['name']]=_0x29c84b['title']['toLowerCase']();_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','join',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePostApply','join',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatInline','imageStylePostApply','join',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','accept',()=>{}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','discard',(_0x30ed40,_0x415e94)=>{_0x1d5ede['_suggestionFactory']['getSuggestionCallback']('formatBlock','','accept')(_0x30ed40,{'commandName':_0x415e94['commandName'],'commandParams':_0x415e94['commandReversedParams']});}),_0x1d5ede['_suggestionFactory']['registerCustomCallback']('formatBlock','imageStylePreApply','chain',_0x31a07d);}const _0x410e36=[{'type':'formatBlock','subType':'imageStylePreApply'},{'type':'insertion','subType':'imageCaption'},{'type':'formatBlock','subType':'convertInlineImageToBlock'},{'type':'insertion','subType':'convertInlineImageToBlock'}];function _0x430722(_0x5dd2c2,_0x4b2d8f){const _0xf4cf45=_0x410e36['findIndex'](({type:_0x5816c3,subType:_0x209008})=>_0x5dd2c2['type']==_0x5816c3&&_0x5dd2c2['subType']==_0x209008),_0x33ccfa=_0x410e36['findIndex'](({type:_0x5cc86e,subType:_0x4ecc64})=>_0x4b2d8f['type']==_0x5cc86e&&_0x4b2d8f['subType']==_0x4ecc64);if(_0xf4cf45<0x0||_0x33ccfa<0x0)return!0x1;const _0x484045=_0x5dd2c2['getFirstRange'](),_0x4e3a05=_0x4b2d8f['getFirstRange']();if((0x0==_0xf4cf45||0x1==_0xf4cf45)&&0x2==_0x33ccfa&&_0x484045['isIntersecting'](_0x4e3a05))return!0x0;if(0x2==_0xf4cf45&&0x3==_0x33ccfa){const _0x34fc8a=_0x1d5ede['_findSuggestions'](_0x484045,'insertion')['filter'](({suggestion:_0x460fc1,meta:_0x1a756a})=>_0x1a756a['isOwn']&&'convertInlineImageToBlock'==_0x460fc1['subType']);if(_0x34fc8a['length']>0x1&&_0x4e3a05['end']['isEqual'](_0x484045['start']))return!0x0;if(0x1==_0x34fc8a['length']&&(_0x484045['start']['isEqual'](_0x4e3a05['end'])||_0x484045['end']['isEqual'](_0x4e3a05['start'])))return!0x0;}if(0x3==_0xf4cf45&&0x3==_0x33ccfa&&_0x484045['start']['isBefore'](_0x4e3a05['start'])){const _0x2f4002=_0x484045['end']['nodeAfter'],_0x3b2ffd=_0x4e3a05['start']['nodeBefore'];return _0x53d5aa['isBlockImage'](_0x2f4002)&&_0x2f4002===_0x3b2ffd;}return!0x1;}function _0x31a07d(_0x3c9906,_0x13d8f5){return _0x430722(_0x3c9906,_0x13d8f5)?[_0x3c9906,_0x13d8f5]:_0x430722(_0x13d8f5,_0x3c9906)?[_0x13d8f5,_0x3c9906]:null;}_0xe92450['model']['document']['registerPostFixer'](()=>{let _0x3a8b6d=!0x1;const _0x24b4a3=Array['from'](_0xe92450['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x37e607,data:_0x544eae}of _0x24b4a3){const {group:_0x9cd17,type:_0x3a00f7,subType:_0x3bf1b4,id:_0x42e6af}=_0x1d5ede['_splitMarkerName'](_0x37e607);if('suggestion'==_0x9cd17&&_0x1d5ede['hasSuggestion'](_0x42e6af)){if('formatBlock'==_0x3a00f7&&('imageStylePreApply'==_0x3bf1b4||'imageStylePostApply'==_0x3bf1b4)){const _0x275fd6=_0x1d5ede['getSuggestion'](_0x42e6af);if(_0x544eae['newRange']){const _0x1a7fba=_0x275fd6['getFirstRange']()['getContainedElement']();if(_0x53d5aa['isBlockImage'](_0x1a7fba))continue;_0x1d5ede['discardSuggestion'](_0x275fd6),_0x3a8b6d=!0x0;}}if('insertion'==_0x3a00f7&&'imageCaption'==_0x3bf1b4&&!_0x544eae['newRange']){const _0x436213=_0x1d5ede['getSuggestion'](_0x42e6af);_0x436213['next']&&_0x436213['next']['isInContent']&&(_0x1d5ede['discardSuggestion'](_0x436213['next']),_0x3a8b6d=!0x0);}}}return _0x3a8b6d;}),_0xe92450['plugins']['has']('ImageResize')&&_0x1d5ede['enableCommand']('resizeImage',(_0x4b43d5,_0x2c1d09)=>{const _0x29874d=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']);_0x29874d['getAttribute']('width')!=_0x2c1d09['width']&&_0xe92450['model']['change'](()=>{_0x1d5ede['markBlockFormat'](_0x29874d,{'commandName':'resizeImage','commandParams':[_0x2c1d09]});});}),_0xe92450['plugins']['has']('ImageTextAlternativeEditing')&&_0x1d5ede['enableCommand']('imageTextAlternative',(_0x16d269,_0x270507)=>{const _0x55b780=_0x53d5aa['getClosestSelectedImageElement'](_0xe92450['model']['document']['selection']);(_0x55b780['hasAttribute']('alt')?_0x55b780['getAttribute']('alt'):'')!=_0x270507['newValue']&&_0xe92450['model']['change'](()=>{_0x1d5ede['markBlockFormat'](_0x55b780,{'commandName':'imageTextAlternative','commandParams':[_0x270507]});});}),_0x1d5ede['_descriptionFactory']['registerDescriptionCallback'](_0x25e86d=>{if(!!_0x410e36['find'](({type:_0x59cd80,subType:_0x6e5e2a})=>_0x25e86d['type']==_0x59cd80&&_0x25e86d['subType']==_0x6e5e2a))return _0x25e86d['previous']?{}:void 0x0;}),_0x1d5ede['_descriptionFactory']['registerDescriptionCallback'](_0x2d5d3f=>{if('insertion'==_0x2d5d3f['type']||'deletion'==_0x2d5d3f['type']){const _0x696433=_0x2d5d3f['getContainedElement']();if(_0x696433&&_0x696433['is']('element','caption'))return{'type':'insertion'==_0x2d5d3f['type']?'addObject':'removeObject','name':_0x696433['name'],'quantity':0x1};}}),_0x1d5ede['_descriptionFactory']['registerDescriptionCallback'](_0x1a7748=>'formatBlock'==_0x1a7748['type']&&'convertInlineImageToBlock'==_0x1a7748['subType']?{'type':'format','content':'Inline\x20image\x20to\x20block\x20image'}:'formatBlock'==_0x1a7748['type']&&'convertBlockImageToInline'==_0x1a7748['subType']?{'type':'format','content':'Block\x20image\x20to\x20inline\x20image'}:void 0x0),_0x1d5ede['_descriptionFactory']['registerDescriptionCallback'](_0xf64042=>{const {data:_0x3d501a}=_0xf64042;if(_0x3d501a){if('imageStyle'==_0x3d501a['commandName']){const _0x4c8143=_0x3d501a['commandParams'][0x0]['value'];return _0x51ec22('side'===_0x4c8143?t({'string':'side\x20image','id':'FORMAT_SIDE_IMAGE'}):_0x2fda02[_0x4c8143]||_0x4c8143);}if('imageTextAlternative'==_0x3d501a['commandName']){const _0x1bcb4d=_0x3d501a['commandParams'][0x0]['newValue'];return _0x1bcb4d?{'type':'format','content':t('*Set\x20image\x20text\x20alternative:*\x20%0','\x22'+_0x1bcb4d+'\x22')}:{'type':'format','content':t('*Remove\x20image\x20text\x20alternative*')};}if('resizeImage'==_0x3d501a['commandName']){const _0x23b568=_0x3d501a['commandParams'][0x0]['width'];return _0x23b568?{'type':'format','content':t('*Set\x20image\x20width:*\x20%0',_0x23b568)}:{'type':'format','content':t('*Reset\x20image\x20width*')};}}function _0x51ec22(_0x3289bf){return{'type':'format','content':t('*Format:*\x20%0',_0x3289bf)};}});}}
|
|
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)};}});}}
|