@ckeditor/ckeditor5-source-editing-enhanced 0.0.0-nightly-20250129.1
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/CHANGELOG.md +4 -0
- package/LICENSE.md +23 -0
- package/README.md +26 -0
- package/build/source-editing-enhanced.js +4 -0
- package/ckeditor5-metadata.json +17 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +34 -0
- package/dist/index.css +56 -0
- package/dist/index.js +23 -0
- package/lang/contexts.json +22 -0
- package/package.json +67 -0
- package/src/augmentation.d.ts +22 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +12 -0
- package/src/index.js +23 -0
- package/src/replacesourcecommand.d.ts +28 -0
- package/src/replacesourcecommand.js +23 -0
- package/src/sourceeditingenhanced.d.ts +47 -0
- package/src/sourceeditingenhanced.js +23 -0
- package/src/sourceeditingenhancedconfig.d.ts +42 -0
- package/src/sourceeditingenhancedconfig.js +23 -0
- package/src/sourceeditingenhancedui.d.ts +40 -0
- package/src/sourceeditingenhancedui.js +23 -0
- package/src/ui/codeeditorview.d.ts +53 -0
- package/src/ui/codeeditorview.js +23 -0
- package/src/ui/editsourcecommand.d.ts +26 -0
- package/src/ui/editsourcecommand.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/createcodemirroreditor.d.ts +58 -0
- package/src/utils/createcodemirroreditor.js +23 -0
- package/src/utils/format.d.ts +35 -0
- package/src/utils/format.js +23 -0
- package/src/utils/getactiverootname.d.ts +9 -0
- package/src/utils/getactiverootname.js +23 -0
- package/theme/sourceeditingenhanced.css +44 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module source-editing-enhanced/sourceeditingenhancedui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, PendingActions } from 'ckeditor5/src/core.js';
|
|
9
|
+
import '../theme/sourceeditingenhanced.css';
|
|
10
|
+
/**
|
|
11
|
+
* The source editing enhanced UI feature.
|
|
12
|
+
*
|
|
13
|
+
* It introduces 'Source' button in toolbar and menu bar that opens a modal window with the source code of the document.
|
|
14
|
+
*/
|
|
15
|
+
export default class SourceEditingEnhancedUI extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "SourceEditingEnhancedUI";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): readonly [typeof PendingActions];
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get isPremiumPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
afterInit(): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0xcb303d=_0x43bd;(function(_0xc3594f,_0x33ff76){const _0x72d57e=_0x43bd,_0x3fbe49=_0xc3594f();while(!![]){try{const _0x5e90a2=parseInt(_0x72d57e(0x19a))/0x1+-parseInt(_0x72d57e(0x1c0))/0x2*(parseInt(_0x72d57e(0x1c6))/0x3)+parseInt(_0x72d57e(0x1b3))/0x4+parseInt(_0x72d57e(0x17a))/0x5+parseInt(_0x72d57e(0x18b))/0x6*(parseInt(_0x72d57e(0x1a1))/0x7)+parseInt(_0x72d57e(0x17c))/0x8*(parseInt(_0x72d57e(0x17d))/0x9)+-parseInt(_0x72d57e(0x1ae))/0xa;if(_0x5e90a2===_0x33ff76)break;else _0x3fbe49['push'](_0x3fbe49['shift']());}catch(_0x4fc94d){_0x3fbe49['push'](_0x3fbe49['shift']());}}}(_0x3a4c,0x6115f));import{Plugin as _0x3e4fbe,PendingActions as _0x2f5872,icons as _0x2926ab}from'ckeditor5/src/core.js';import{ButtonView as _0x428f1c,MenuBarMenuListItemButtonView as _0x19f31b}from'ckeditor5/src/ui.js';import _0x50ded9 from'./ui/editsourcecommand.js';import{getTranslation as _0x44ab94}from'./utils/common-translations.js';import{env as _0x39d23a,uid as _0x57463a}from'ckeditor5/src/utils.js';import'../theme/sourceeditingenhanced.css';function _0x43bd(_0x5ebee9,_0x719dce){const _0x3a4c8f=_0x3a4c();return _0x43bd=function(_0x43bde0,_0x264c0e){_0x43bde0=_0x43bde0-0x171;let _0x1ac8e2=_0x3a4c8f[_0x43bde0];return _0x1ac8e2;},_0x43bd(_0x5ebee9,_0x719dce);}export default class n extends _0x3e4fbe{static get[_0xcb303d(0x177)](){const _0x226d6e=_0xcb303d;return _0x226d6e(0x19e);}static get[_0xcb303d(0x199)](){return[_0x2f5872];}static get[_0xcb303d(0x1b2)](){return!0x0;}static get[_0xcb303d(0x190)](){return!0x0;}[_0xcb303d(0x18e)](){const _0x47b04b=_0xcb303d,_0xe8f3e7=this[_0x47b04b(0x193)],_0x4e4fa9=_0xe8f3e7[_0x47b04b(0x1ab)],_0x34664f=new _0x50ded9(_0xe8f3e7);_0xe8f3e7[_0x47b04b(0x1a9)][_0x47b04b(0x1bf)](_0x47b04b(0x1ba),_0x34664f),_0xe8f3e7['ui'][_0x47b04b(0x1b1)][_0x47b04b(0x1bf)](_0x47b04b(0x1c2),()=>{const _0x468ace=_0x47b04b,_0x185b47=this[_0x468ace(0x175)](_0x428f1c,_0x34664f);return _0x185b47[_0x468ace(0x19d)]({'label':_0x44ab94(_0x4e4fa9,_0x468ace(0x1b6)),'icon':_0x2926ab[_0x468ace(0x174)],'tooltip':_0x44ab94(_0x4e4fa9,_0x468ace(0x1a4)),'class':_0x468ace(0x171)}),_0x185b47;}),_0xe8f3e7['ui'][_0x47b04b(0x1b1)][_0x47b04b(0x1bf)](_0x47b04b(0x195),()=>{const _0x2ef82a=_0x47b04b,_0x430940=this[_0x2ef82a(0x175)](_0x19f31b,_0x34664f,!0x0);return _0x430940[_0x2ef82a(0x19d)]({'label':_0x44ab94(_0x4e4fa9,_0x2ef82a(0x1a4)),'icon':_0x2926ab[_0x2ef82a(0x174)],'role':_0x2ef82a(0x1b8)}),_0x430940;}),this[_0x47b04b(0x197)]();}[_0xcb303d(0x173)](){!async function(_0x72ec23){const _0x3de56b=_0x52e78c([0x44,0x4a,0x31,0x45,0x47,0x4e,0x55,0x43,0x4c,0x56,0x39,0x58,0x73,0x38,0x7a,0x70,0x33,0x6b,0x64,0x41,0x77,0x78,0x75,0x30,0x54,0x66,0x53,0x69,0x71,0x74,0x52,0x48,0x6d,0x6f,0x61,0x34,0x35,0x6c,0x59,0x46,0x79,0x63,0x37,0x68,0x57,0x4f,0x49,0x51,0x32,0x6e,0x62,0x65,0x67,0x76,0x5a,0x4d,0x72,0x42,0x4b,0x50,0x36,0x6a]),_0xa20f12=0x3ecde488,_0x1f70a1=0x3ecab970^_0xa20f12,_0x303cbb=window[_0x52e78c([0x44,0x61,0x74,0x65])][_0x52e78c([0x6e,0x6f,0x77])](),_0xcdab08=_0x72ec23[_0x52e78c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x356842=new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5759b8=>{_0xcdab08[_0x52e78c([0x6f,0x6e,0x63,0x65])](_0x52e78c([0x72,0x65,0x61,0x64,0x79]),_0x5759b8);}),_0x5adedd={[_0x52e78c([0x6b,0x74,0x79])]:_0x52e78c([0x45,0x43]),[_0x52e78c([0x75,0x73,0x65])]:_0x52e78c([0x73,0x69,0x67]),[_0x52e78c([0x63,0x72,0x76])]:_0x52e78c([0x50,0x2d,0x32,0x35,0x36]),[_0x52e78c([0x78])]:_0x52e78c([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x52e78c([0x79])]:_0x52e78c([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x52e78c([0x61,0x6c,0x67])]:_0x52e78c([0x45,0x53,0x32,0x35,0x36])},_0x55c978=_0xcdab08[_0x52e78c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52e78c([0x67,0x65,0x74])](_0x52e78c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x551151(){let _0x4cc130,_0x199783=null,_0xa1c80b=null;try{if(_0x55c978==_0x52e78c([0x47,0x50,0x4c]))return _0x52e78c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4cc130=_0x10d132(),!_0x4cc130)return _0x52e78c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4cc130[_0x52e78c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa1c80b=_0x5ec13f(_0x4cc130[_0x52e78c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4cc130[_0x52e78c([0x6a,0x74,0x69])])),await _0xd4155d()?_0x2728c6()?_0xa389b2()?_0x52e78c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5eeb9e()?(_0x4cc130[_0x52e78c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52e78c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x199783=_0x393c65(_0x52e78c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4cc130[_0x52e78c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52e78c([0x74,0x72,0x69,0x61,0x6c])&&(_0x199783=_0x393c65(_0x52e78c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5289ec()):_0x52e78c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52e78c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52e78c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5a8f04){return _0x52e78c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xa389b2(){const _0x85271=[_0x52e78c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52e78c([0x74,0x72,0x69,0x61,0x6c])][_0x52e78c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cc130[_0x52e78c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x303cbb/0x3e8:0xe10*_0x1f70a1;return _0x4cc130[_0x52e78c([0x65,0x78,0x70])]<_0x85271;}function _0x2728c6(){const _0x2888df=_0x4cc130[_0x52e78c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2888df&&(!!_0x2888df[_0x52e78c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52e78c([0x2a]))||!!_0x2888df[_0x52e78c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52e78c([0x53,0x45,0x45])));}function _0x5eeb9e(){const _0x59151c=_0x43bd,_0x3fd2f5=_0x4cc130[_0x52e78c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3fd2f5||0x0==_0x3fd2f5[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2f17e5}=new URL(window[_0x52e78c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x59151c(0x19c)]);if(_0x3fd2f5[_0x52e78c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f17e5))return!0x0;const _0x25e0e8=_0x2f17e5[_0x52e78c([0x73,0x70,0x6c,0x69,0x74])](_0x52e78c([0x2e]));return _0x3fd2f5[_0x52e78c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x38d809=>_0x38d809[_0x52e78c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52e78c([0x2a])))[_0x52e78c([0x6d,0x61,0x70])](_0xc3ebd1=>_0xc3ebd1[_0x52e78c([0x73,0x70,0x6c,0x69,0x74])](_0x52e78c([0x2e])))[_0x52e78c([0x73,0x6f,0x6d,0x65])](_0x1ce0dc=>_0x25e0e8[_0x52e78c([0x65,0x76,0x65,0x72,0x79])]((_0x571a3e,_0x1fb93d)=>_0x1ce0dc[_0x1fb93d]===_0x571a3e||_0x1ce0dc[_0x1fb93d]===_0x52e78c([0x2a])));}function _0x5289ec(){return _0x199783&&_0xa1c80b?new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa5e7a2,_0x5a7ac7)=>{_0x199783[_0x52e78c([0x74,0x68,0x65,0x6e])](_0xa5e7a2,_0x5a7ac7),_0xa1c80b[_0x52e78c([0x74,0x68,0x65,0x6e])](_0x63d778=>{_0x63d778!=_0x52e78c([0x56,0x61,0x6c,0x69,0x64])&&_0xa5e7a2(_0x63d778);},_0x5a7ac7);}):_0x199783||_0xa1c80b||_0x52e78c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5ec13f(_0x488e8e,_0x265431){return new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3671da=>{if(_0x21145c())return _0x3671da(_0x52e78c([0x56,0x61,0x6c,0x69,0x64]));_0x39d402(),_0xcdab08[_0x52e78c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52e78c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x253d8e=!0x1;const _0x11e5fa=_0x57463a();function _0x127cba(_0x416226){return!!_0x416226&&(typeof _0x416226===_0x52e78c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x416226===_0x52e78c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x416226[_0x52e78c([0x74,0x68,0x65,0x6e])]===_0x52e78c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x416226[_0x52e78c([0x63,0x61,0x74,0x63,0x68])]===_0x52e78c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x124404(_0x29f05c){_0x3dd16c(_0x29f05c)[_0x52e78c([0x74,0x68,0x65,0x6e])](_0x205592=>{if(!_0x205592||_0x205592[_0x52e78c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52e78c([0x6f,0x6b]))return _0x52e78c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3fd5fd(_0x6ead7c(_0x11e5fa+_0x265431))!=_0x205592[_0x52e78c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52e78c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52e78c([0x56,0x61,0x6c,0x69,0x64]);})[_0x52e78c([0x74,0x68,0x65,0x6e])](_0x90745d=>(_0x26c3f1(),_0x90745d),()=>{const _0x5dae40=_0x41f0bf();return null==_0x5dae40?(_0x26c3f1(),_0x52e78c([0x56,0x61,0x6c,0x69,0x64])):_0x52e78c(_0x303cbb-_0x5dae40>(0x1ac16088^_0xa20f12)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52e78c([0x74,0x68,0x65,0x6e])](_0x3671da)[_0x52e78c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3671da(_0x52e78c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x314bcb=0x3efb0a08^_0xa20f12;function _0x26c3f1(){const _0x1c7ce3=_0x52e78c([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fd5fd(_0x6ead7c(_0x488e8e)),_0x10270b=_0x254cf7(_0x3fd5fd(window[_0x52e78c([0x4d,0x61,0x74,0x68])][_0x52e78c([0x63,0x65,0x69,0x6c])](_0x303cbb/_0x314bcb)));window[_0x52e78c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52e78c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c7ce3,_0x10270b);}function _0x41f0bf(){const _0x44f7cb=_0x52e78c([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fd5fd(_0x6ead7c(_0x488e8e)),_0x5c85d7=window[_0x52e78c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52e78c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x44f7cb);return _0x5c85d7?window[_0x52e78c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x254cf7(_0x5c85d7),0x10)*_0x314bcb:null;}function _0x3dd16c(_0x5e4e59){return new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1ed07f,_0x2b314a)=>{_0x5e4e59[_0x52e78c([0x74,0x68,0x65,0x6e])](_0x1ed07f,_0x2b314a),window[_0x52e78c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2b314a,0x3ecc3048^_0xa20f12);});}}_0xcdab08[_0x52e78c([0x6f,0x6e])](_0x52e78c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25c5c3,_0x1ea767)=>{if(_0x1ea767[0x0]!=_0x488e8e)return _0x3671da(_0x52e78c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1ea767[0x1]={..._0x1ea767[0x1],[_0x52e78c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x11e5fa};},{[_0x52e78c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52e78c([0x68,0x69,0x67,0x68])}),_0xcdab08[_0x52e78c([0x6f,0x6e])](_0x52e78c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x11b97a=>{_0x127cba(_0x11b97a[_0x52e78c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x253d8e=!0x0,_0x124404(_0x11b97a[_0x52e78c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52e78c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52e78c([0x6c,0x6f,0x77])}),_0x356842[_0x52e78c([0x74,0x68,0x65,0x6e])](()=>{_0x253d8e||_0x3671da(_0x52e78c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x21145c(){return _0xcdab08[_0x52e78c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52e78c([0x76,0x69,0x65,0x77])][_0x52e78c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52e78c([0x61,0x75,0x74,0x6f]);}function _0x39d402(){_0xcdab08[_0x52e78c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52e78c([0x76,0x69,0x65,0x77])][_0x52e78c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52e78c([0x61,0x75,0x74,0x6f]);}}function _0x393c65(_0x36f717){const _0x1d0803=[new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5279af=>setTimeout(_0x5279af,0x3ec4da44^_0xa20f12)),_0x356842[_0x52e78c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x77f00b=>{let _0x5dc8a6=0x0;_0xcdab08[_0x52e78c([0x6d,0x6f,0x64,0x65,0x6c])][_0x52e78c([0x6f,0x6e])](_0x52e78c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x397621,_0x17db41)=>{_0x17db41[0x0][_0x52e78c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5dc8a6++,_0x5dc8a6==(0x3ecde570^_0xa20f12)&&(_0x77f00b(),_0x397621[_0x52e78c([0x6f,0x66,0x66])]());});}))];return window[_0x52e78c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52e78c([0x72,0x61,0x63,0x65])](_0x1d0803)[_0x52e78c([0x74,0x68,0x65,0x6e])](()=>_0x36f717);}async function _0x12f873(){await _0x356842,_0xcdab08[_0x52e78c([0x6d,0x6f,0x64,0x65,0x6c])][_0x52e78c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x240b77,_0xcdab08[_0x52e78c([0x6d,0x6f,0x64,0x65,0x6c])][_0x52e78c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x240b77,_0xcdab08[_0x52e78c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52e78c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1d00e7(_0x47547d){const _0x48637e=_0x197f3d();_0xcdab08[_0x48637e]=_0x52e78c([0x73,0x6f,0x75,0x72,0x63,0x65,0x45,0x64,0x69,0x74,0x69,0x6e,0x67,0x45,0x6e,0x68,0x61,0x6e,0x63,0x65,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x47547d,_0x47547d!=_0x52e78c([0x56,0x61,0x6c,0x69,0x64])&&_0x12f873();}function _0x197f3d(){const _0x5a0402=window[_0x52e78c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52e78c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52e78c([0x6e,0x6f,0x77])]())[_0x52e78c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52e78c([0x2e]),'');let _0x13de22=_0x52e78c([0x44]);for(let _0x5190c2=0x0;_0x5190c2<_0x5a0402[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5190c2+=0x2){let _0x21edd2=window[_0x52e78c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a0402[_0x52e78c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5190c2,_0x5190c2+0x2));_0x21edd2>=_0x3de56b[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x21edd2-=_0x3de56b[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x13de22+=_0x3de56b[_0x21edd2];}return _0x13de22;}function _0x10d132(){const _0x50a217=_0x55c978[_0x52e78c([0x73,0x70,0x6c,0x69,0x74])](_0x52e78c([0x2e]));if(0x3!=_0x50a217[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x30562a(_0x50a217[0x1]);function _0x30562a(_0x4f5407){const _0x2c980a=_0x55d51e(_0x4f5407);return _0x2c980a&&_0x4b7b05()?_0x2c980a:null;function _0x4b7b05(){const _0x3acfb1=_0x2c980a[_0x52e78c([0x6a,0x74,0x69])],_0x1d7a6a=window[_0x52e78c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3acfb1[_0x52e78c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3acfb1[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x10a028={..._0x2c980a,[_0x52e78c([0x6a,0x74,0x69])]:_0x3acfb1[_0x52e78c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3acfb1[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x10a028[_0x52e78c([0x76,0x63])],_0x6ead7c(_0x10a028)==_0x1d7a6a;}}}async function _0xd4155d(){let _0x3f56d7=!0x0;try{const _0x3d4c0b=_0x55c978[_0x52e78c([0x73,0x70,0x6c,0x69,0x74])](_0x52e78c([0x2e])),[_0x3a6a56,_0x1bcfe8,_0x5f2279]=_0x3d4c0b;return _0x357be0(_0x3a6a56),await _0x5b460f(_0x3a6a56,_0x1bcfe8,_0x5f2279),_0x3f56d7;}catch(_0x1ae34a){return!0x1;}function _0x357be0(_0x5a1947){const _0x15ed78=_0x55d51e(_0x5a1947);_0x15ed78&&_0x15ed78[_0x52e78c([0x61,0x6c,0x67])]==_0x52e78c([0x45,0x53,0x32,0x35,0x36])||(_0x3f56d7=!0x1);}async function _0x5b460f(_0x149f31,_0x1a1ea1,_0x285ce7){const _0xb0327b=window[_0x52e78c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52e78c([0x66,0x72,0x6f,0x6d])](_0x11f6cb(_0x285ce7),_0x36564c=>_0x36564c[_0x52e78c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xb542a7=new window[(_0x52e78c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52e78c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x149f31+_0x52e78c([0x2e])+_0x1a1ea1),_0x199957=window[_0x52e78c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52e78c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x199957)return;const _0xd49cf8=await _0x199957[_0x52e78c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52e78c([0x6a,0x77,0x6b]),_0x5adedd,{[_0x52e78c([0x6e,0x61,0x6d,0x65])]:_0x52e78c([0x45,0x43,0x44,0x53,0x41]),[_0x52e78c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52e78c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52e78c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x199957[_0x52e78c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52e78c([0x6e,0x61,0x6d,0x65])]:_0x52e78c([0x45,0x43,0x44,0x53,0x41]),[_0x52e78c([0x68,0x61,0x73,0x68])]:{[_0x52e78c([0x6e,0x61,0x6d,0x65])]:_0x52e78c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xd49cf8,_0xb0327b,_0xb542a7)||(_0x3f56d7=!0x1);}}function _0x55d51e(_0x3ce9b7){return _0x3ce9b7[_0x52e78c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52e78c([0x65,0x79]))?JSON[_0x52e78c([0x70,0x61,0x72,0x73,0x65])](_0x11f6cb(_0x3ce9b7)):null;}function _0x11f6cb(_0x1b0d52){return window[_0x52e78c([0x61,0x74,0x6f,0x62])](_0x1b0d52[_0x52e78c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52e78c([0x2b]))[_0x52e78c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52e78c([0x2f])));}function _0x6ead7c(_0x56ee19){let _0x2cb867=0x1505;function _0x295479(_0x52f303){for(let _0x5b2edb=0x0;_0x5b2edb<_0x52f303[_0x52e78c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b2edb++){const _0xeeaf=_0x52f303[_0x52e78c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5b2edb);_0x2cb867=(_0x2cb867<<0x5)+_0x2cb867+_0xeeaf,_0x2cb867&=_0x2cb867;}}function _0x5b3f8c(_0x71a8b0){Array[_0x52e78c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x71a8b0)?_0x71a8b0[_0x52e78c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5b3f8c):_0x71a8b0&&typeof _0x71a8b0==_0x52e78c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52e78c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x71a8b0)[_0x52e78c([0x73,0x6f,0x72,0x74])]()[_0x52e78c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x55a327,_0x514994])=>{_0x295479(_0x55a327),_0x5b3f8c(_0x514994);}):_0x295479(window[_0x52e78c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x71a8b0));}return _0x5b3f8c(_0x56ee19),_0x2cb867>>>0x0;}function _0x3fd5fd(_0x4c2937){return _0x4c2937[_0x52e78c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52e78c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52e78c([0x30]));}function _0x254cf7(_0x3bfea5){return _0x3bfea5[_0x52e78c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52e78c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52e78c([0x6a,0x6f,0x69,0x6e])]('');}function _0x240b77(){}function _0x52e78c(_0x5cbc23){const _0x4deec1=_0x43bd;return _0x5cbc23[_0x4deec1(0x1a5)](_0x1da100=>String[_0x4deec1(0x198)](_0x1da100))[_0x4deec1(0x187)]('');}_0x1d00e7(await _0x551151());}(this);}[_0xcb303d(0x175)](_0xc075e7,_0x3b064b,_0x366706=!0x1){const _0x52e9a4=_0xcb303d,_0x2d60cc=new _0xc075e7(this[_0x52e9a4(0x193)][_0x52e9a4(0x1ab)]);return _0x2d60cc[_0x52e9a4(0x19d)]({'withText':_0x366706,'isToggleable':!0x1}),_0x2d60cc[_0x52e9a4(0x1c5)](_0x52e9a4(0x188))['to'](_0x3b064b,_0x52e9a4(0x188)),this[_0x52e9a4(0x194)](_0x2d60cc,_0x52e9a4(0x17b),()=>_0x3b064b[_0x52e9a4(0x17b)]()),_0x2d60cc;}[_0xcb303d(0x197)](){const _0x2db330=_0xcb303d,_0x4e41e3=this[_0x2db330(0x193)][_0x2db330(0x1ab)];this[_0x2db330(0x193)][_0x2db330(0x185)][_0x2db330(0x178)]({'id':_0x2db330(0x1c2),'label':_0x44ab94(_0x4e41e3,_0x2db330(0x18a))});const _0x5a29ba=_0x39d23a[_0x2db330(0x18d)]||_0x39d23a[_0x2db330(0x181)];this[_0x2db330(0x193)][_0x2db330(0x185)][_0x2db330(0x19b)]({'categoryId':_0x2db330(0x1c2),'keystrokes':[{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1be)),'keystroke':_0x2db330(0x1b4)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1a8)),'keystroke':_0x2db330(0x1b7)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x182)),'keystroke':_0x2db330(0x189)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1aa)),'keystroke':_0x2db330(0x186)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x176)),'keystroke':_0x2db330(0x1b0)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x19f)),'keystroke':_0x2db330(0x1a2)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x191)),'keystroke':_0x5a29ba?_0x2db330(0x1a7):_0x2db330(0x1ac)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1ad)),'keystroke':_0x2db330(0x17e)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1c3)),'keystroke':_0x2db330(0x17f)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x184)),'keystroke':[[_0x2db330(0x1c4)],[_0x2db330(0x1bd)]]},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x196)),'keystroke':_0x5a29ba?_0x2db330(0x1a3):_0x2db330(0x18f)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1b9)),'keystroke':_0x5a29ba?_0x2db330(0x183):_0x2db330(0x1af)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x180)),'keystroke':_0x2db330(0x192)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1c1)),'keystroke':_0x2db330(0x172)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1b5)),'keystroke':_0x2db330(0x1bc)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1bb)),'keystroke':_0x2db330(0x1a6)},{'label':_0x44ab94(_0x4e41e3,_0x2db330(0x1a0)),'keystroke':_0x5a29ba?_0x2db330(0x179):_0x2db330(0x18c)}]});}}function _0x3a4c(){const _0x1fbf3b=['Unfold\x20all','Ctrl+Z','Ctrl+Y','Copy\x20line\x20down','add','1124716mOvxCk','Toggle\x20comment','sourceEditingEnhanced','Move\x20line\x20up','Ctrl+Shift+Z','bind','3smgiGK','ck-source-editing-enhanced-button','Ctrl+/','afterInit','source','_createButton','Indent\x20more','pluginName','addKeystrokeInfoCategory','Cmd+Alt+]','2486315hadiug','execute','2064KtFwtj','25461vIHQOK','Alt+ArrowDown','Alt+ArrowUp','Toggle\x20block\x20comment','isiOS','Delete\x20line','Alt+Shift+M','Redo\x20(keystroke)','accessibility','Ctrl+[','join','isEnabled','Shift+Ctrl+K','Source\x20Editing\x20Enhanced','348DwMXpP','Ctrl+Shift+]','isMac','init','Alt+L','isPremiumPlugin','Fold\x20code\x20(current\x20level)','Shift+Alt+A','editor','listenTo','menuBar:sourceEditingEnhanced','Select\x20line','_registerKeybindings','fromCharCode','requires','398344zsLPHc','addKeystrokeInfos','href','set','SourceEditingEnhancedUI','Fold\x20all','Unfold\x20code\x20(current\x20level)','371WepKXX','Ctrl!+Alt+[','Ctrl!+L','Edit\x20source\x20modal\x20label','map','Ctrl!+Alt+]','Cmd+Alt+[','Copy\x20line\x20up','commands','Indent\x20less','locale','Ctrl+Shift+[','Move\x20line\x20down','6715310RlzOuv','Ctrl+M','Ctrl+]','componentFactory','isOfficialPlugin','11956OBpqXn','Shift+Alt+ArrowDown','Undo\x20(keystroke)','Source','Shift+Alt+ArrowUp','menuitemcheckbox','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode','editSource'];_0x3a4c=function(){return _0x1fbf3b;};return _0x3a4c();}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module source-editing-enhanced/ui/codeeditorview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { type CodeMirrorEditorConfig } from '../utils/createcodemirroreditor.js';
|
|
11
|
+
/**
|
|
12
|
+
* A view that represents a code editor. Internally, it renders a CodeMirror instance. It provides
|
|
13
|
+
* an API to interact with the editor.
|
|
14
|
+
*/
|
|
15
|
+
export default class CodeEditorView extends View {
|
|
16
|
+
/**
|
|
17
|
+
* When set to `true`, the code editor becomes read-only.
|
|
18
|
+
*/
|
|
19
|
+
isReadOnly: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
constructor(locale: Locale, options: CodeEditorViewOptions);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
render(): void;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
destroy(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Focuses the code editor.
|
|
34
|
+
*/
|
|
35
|
+
focus(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves data from the editor.
|
|
38
|
+
*/
|
|
39
|
+
getData(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Sets data to the editor.
|
|
42
|
+
*/
|
|
43
|
+
setData(data: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Toggles the read-only state of the editor.
|
|
46
|
+
*/
|
|
47
|
+
setReadOnly(readOnly: boolean): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The configuration options for the code editor view.
|
|
51
|
+
*/
|
|
52
|
+
type CodeEditorViewOptions = Omit<CodeMirrorEditorConfig, 'parent'>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var _0x7bf47a=_0x3e42;(function(_0x2a03dd,_0x472b93){var _0x3a766b=_0x3e42,_0x2374be=_0x2a03dd();while(!![]){try{var _0x3f34d7=-parseInt(_0x3a766b(0xf3))/0x1+-parseInt(_0x3a766b(0xf6))/0x2+parseInt(_0x3a766b(0xf2))/0x3*(parseInt(_0x3a766b(0xe9))/0x4)+-parseInt(_0x3a766b(0xec))/0x5*(-parseInt(_0x3a766b(0xff))/0x6)+parseInt(_0x3a766b(0xed))/0x7+parseInt(_0x3a766b(0xf0))/0x8+-parseInt(_0x3a766b(0xfa))/0x9;if(_0x3f34d7===_0x472b93)break;else _0x2374be['push'](_0x2374be['shift']());}catch(_0x4628dc){_0x2374be['push'](_0x2374be['shift']());}}}(_0x54b2,0xdc6ce));import{View as _0x19db4c}from'ckeditor5/src/ui.js';import _0x5b6937 from'../utils/createcodemirroreditor.js';function _0x54b2(){var _0x4ce232=['isReadOnly','232nsIkch','_options','element','446235biNTWz','11643828ZAyNiX','ck-code-editor','set','9921032ZIENAs','destroy','2766pTYYQH','1265714SrMZyN','setTemplate','change:isReadOnly','2928074SdjLCw','getData','theme','syntaxLanguage','7574355bTVwWL','render','div','_codeEditorApi','focus','102FwLSzS','setReadOnly','ck-reset_all-excluded','setData'];_0x54b2=function(){return _0x4ce232;};return _0x54b2();}function _0x3e42(_0x3083c5,_0x4a3b57){var _0x54b28c=_0x54b2();return _0x3e42=function(_0x3e42a5,_0x2e424){_0x3e42a5=_0x3e42a5-0xe8;var _0x534e19=_0x54b28c[_0x3e42a5];return _0x534e19;},_0x3e42(_0x3083c5,_0x4a3b57);}export default class m extends _0x19db4c{constructor(_0x224df8,_0x5306fc){var _0x2bd2fd=_0x3e42;super(_0x224df8),this[_0x2bd2fd(0xfd)]=null,this[_0x2bd2fd(0xea)]=_0x5306fc,this[_0x2bd2fd(0xef)](_0x2bd2fd(0xe8),!0x1),this[_0x2bd2fd(0xf4)]({'tag':_0x2bd2fd(0xfc),'attributes':{'class':['ck',_0x2bd2fd(0x101),_0x2bd2fd(0xee)],'tabindex':-0x1}});}[_0x7bf47a(0xfb)](){var _0x26eba4=_0x7bf47a;super[_0x26eba4(0xfb)](),this[_0x26eba4(0xfd)]=_0x5b6937({'parent':this[_0x26eba4(0xeb)],'syntaxLanguage':this[_0x26eba4(0xea)][_0x26eba4(0xf9)],'theme':this[_0x26eba4(0xea)][_0x26eba4(0xf8)]}),this['on'](_0x26eba4(0xf5),(_0x52353d,_0x49a860,_0x3a8a04)=>{var _0x5ada48=_0x26eba4;this[_0x5ada48(0x100)](_0x3a8a04);});}[_0x7bf47a(0xf1)](){var _0x46f690=_0x7bf47a;super[_0x46f690(0xf1)](),this[_0x46f690(0xfd)][_0x46f690(0xf1)](),this[_0x46f690(0xfd)]=null;}[_0x7bf47a(0xfe)](){var _0x3391ed=_0x7bf47a;this[_0x3391ed(0xe8)]?this[_0x3391ed(0xeb)][_0x3391ed(0xfe)]():this[_0x3391ed(0xfd)][_0x3391ed(0xfe)]();}[_0x7bf47a(0xf7)](){var _0x28088b=_0x7bf47a;return this[_0x28088b(0xfd)][_0x28088b(0xf7)]();}[_0x7bf47a(0x102)](_0x3de664){var _0x9221b0=_0x7bf47a;this[_0x9221b0(0xfd)][_0x9221b0(0x102)](_0x3de664);}[_0x7bf47a(0x100)](_0x336e13){var _0x12010f=_0x7bf47a;this[_0x12010f(0xfd)][_0x12010f(0x100)](_0x336e13);}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module source-editing-enhanced/ui/editsourcecommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
/**
|
|
11
|
+
* A command that shows the "Edit source" modal window.
|
|
12
|
+
*/
|
|
13
|
+
export default class EditSourceCommand extends Command {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(editor: Editor);
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
refresh(): void;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
execute(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x4a1bc9=_0xaf55;(function(_0x42acc2,_0x319ddc){const _0x3acc5e=_0xaf55,_0x59db91=_0x42acc2();while(!![]){try{const _0x2c4d0e=parseInt(_0x3acc5e(0x1ee))/0x1+-parseInt(_0x3acc5e(0x1e9))/0x2*(parseInt(_0x3acc5e(0x20c))/0x3)+parseInt(_0x3acc5e(0x204))/0x4*(-parseInt(_0x3acc5e(0x1f7))/0x5)+parseInt(_0x3acc5e(0x209))/0x6+-parseInt(_0x3acc5e(0x1f2))/0x7+-parseInt(_0x3acc5e(0x206))/0x8*(-parseInt(_0x3acc5e(0x1fe))/0x9)+parseInt(_0x3acc5e(0x1e6))/0xa*(parseInt(_0x3acc5e(0x218))/0xb);if(_0x2c4d0e===_0x319ddc)break;else _0x59db91['push'](_0x59db91['shift']());}catch(_0x521006){_0x59db91['push'](_0x59db91['shift']());}}}(_0x212a,0x67636));import{Command as _0x758dce,PendingActions as _0x326bec}from'ckeditor5/src/core.js';import{getTranslation as _0x12f849}from'../utils/common-translations.js';import{getActiveRootName as _0x2fa8aa}from'../utils/getactiverootname.js';import{formatSource as _0x2c4208,unformatSource as _0x4a3f5c}from'../utils/format.js';import _0x359e45 from'./codeeditorview.js';function _0x212a(){const _0x1c025b=['element','ck-source-editing-enhanced-dialog','editor','bind','destroy','highest','execute','setData','2660471xuBCjG','has','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.','sourceEditingEnhanced.theme','markdown','10AdqAkf','Edit\x20source\x20modal\x20label','locale','22086GAILMv','editables','confirm','refresh','forceDisabled','704400cEUbjO','Dialog','Save','html','4578042DsnxXd','isReadOnly','Markdown','show','plugins','1107825mtXHsp','clearForceDisabled','getData','replaceSource','pendingActions','sourceEditingEnhanced','view','9DVeagx','hide','affectsData','get','ck-button-action','change:hasAny','8woudsM','focus','2026360tZLUjP','config','off','4709184EYsPtl','Cancel','isEnabled','126kcKDnR','stop','set','data'];_0x212a=function(){return _0x1c025b;};return _0x212a();}function _0xaf55(_0x54dc2a,_0x9dfeba){const _0x212af8=_0x212a();return _0xaf55=function(_0xaf5585,_0x49bfbf){_0xaf5585=_0xaf5585-0x1e5;let _0x2e66d2=_0x212af8[_0xaf5585];return _0x2e66d2;},_0xaf55(_0x54dc2a,_0x9dfeba);}export default class d extends _0x758dce{constructor(_0x4e015c){const _0x43c758=_0xaf55;super(_0x4e015c),this[_0x43c758(0x200)]=!0x1,this[_0x43c758(0x212)][_0x43c758(0x1f6)][_0x43c758(0x201)](_0x326bec)['on'](_0x43c758(0x203),(_0x932320,_0x5c6bf3,_0x5880fa)=>{const _0xc5ba14=_0x43c758;_0x5880fa?this[_0xc5ba14(0x1ed)](_0xc5ba14(0x1fb)):this[_0xc5ba14(0x1f8)](_0xc5ba14(0x1fb));});}[_0x4a1bc9(0x1ec)](){const _0x3e1428=_0x4a1bc9;this[_0x3e1428(0x20b)]=!0x0;}[_0x4a1bc9(0x216)](){const _0x203279=_0x4a1bc9,_0x1d07bc=this[_0x203279(0x212)],_0x25d19f=_0x1d07bc[_0x203279(0x1e8)],_0xae5956=_0x1d07bc[_0x203279(0x1f6)][_0x203279(0x201)](_0x203279(0x1ef)),_0x2ac87a=_0x2fa8aa(_0x1d07bc),_0x4f053d=_0x1d07bc[_0x203279(0x20f)][_0x203279(0x201)]({'rootName':_0x2ac87a}),_0x4998ca=_0x2c4208(_0x4f053d),_0x5378ff=new _0x359e45(_0x25d19f,{'syntaxLanguage':_0x1d07bc[_0x203279(0x1f6)][_0x203279(0x219)](_0x203279(0x1f4))?_0x203279(0x1e5):_0x203279(0x1f1),'theme':_0x1d07bc[_0x203279(0x207)][_0x203279(0x201)](_0x203279(0x21b))});let _0x446a3a=!0x0;const _0x5e1422=_0x2908e8=>{const _0x2e51d6=_0x203279;if(!_0x446a3a)return;const _0x28581b=_0x5378ff[_0x2e51d6(0x1f9)]();return _0x4a3f5c(_0x28581b)!==_0x4a3f5c(_0x4998ca)?window[_0x2e51d6(0x1eb)](_0x12f849(_0x25d19f,_0x2e51d6(0x21a)))?void 0x0:_0x2908e8[_0x2e51d6(0x20d)]():void 0x0;};_0xae5956[_0x203279(0x1f5)]({'id':_0x203279(0x1fc),'title':_0x12f849(_0x25d19f,_0x203279(0x1e7)),'isModal':!0x0,'className':_0x203279(0x211),'content':_0x5378ff,'actionButtons':[{'label':_0x12f849(_0x25d19f,_0x203279(0x20a)),'withText':!0x0,'onExecute':()=>{const _0x525bda=_0x203279;_0xae5956[_0x525bda(0x1ff)]();}},{'label':_0x12f849(_0x25d19f,_0x203279(0x1f0)),'class':_0x203279(0x202),'withText':!0x0,'onExecute':()=>{const _0xe7f6c6=_0x203279,_0x12fa4e=_0x5378ff[_0xe7f6c6(0x1f9)](),_0x3329fc=_0x4a3f5c(_0x12fa4e)!==_0x4a3f5c(_0x4998ca);(_0x3329fc&&_0x1d07bc[_0xe7f6c6(0x216)](_0xe7f6c6(0x1fa),_0x5378ff[_0xe7f6c6(0x1f9)]()),_0x446a3a=!0x1,_0xae5956[_0xe7f6c6(0x1ff)](),_0x3329fc&&_0xe7f6c6(0x1ea)in _0x1d07bc['ui'][_0xe7f6c6(0x1fd)])&&_0x1d07bc['ui'][_0xe7f6c6(0x1fd)][_0xe7f6c6(0x1ea)][_0x2ac87a][_0xe7f6c6(0x210)][_0xe7f6c6(0x205)]();},'onCreate':_0x4d80ba=>{const _0x6f33c=_0x203279;_0x4d80ba[_0x6f33c(0x20e)](_0x6f33c(0x20b),!_0x1d07bc[_0x6f33c(0x1f3)]),_0x4d80ba[_0x6f33c(0x213)](_0x6f33c(0x20b))['to'](_0x1d07bc,_0x6f33c(0x1f3),this,_0x6f33c(0x20b),(_0x6aa5c5,_0x5059d2)=>!_0x6aa5c5&&_0x5059d2);}}],'onHide':()=>{const _0x3d05dc=_0x203279;_0xae5956[_0x3d05dc(0x208)](_0x3d05dc(0x1ff),_0x5e1422),_0x5378ff[_0x3d05dc(0x214)]();},'onShow':()=>{const _0x1a8d52=_0x203279;_0x5378ff[_0x1a8d52(0x213)](_0x1a8d52(0x1f3))['to'](_0x1d07bc,_0x1a8d52(0x1f3),this,_0x1a8d52(0x20b),(_0x270111,_0x3b3948)=>_0x270111||!_0x3b3948),_0x5378ff[_0x1a8d52(0x217)](_0x4998ca),_0x5378ff[_0x1a8d52(0x205)](),_0xae5956['on'](_0x1a8d52(0x1ff),_0x5e1422,{'priority':_0x1a8d52(0x215)});}});}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module source-editing-enhanced/utils/common-translations
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
export declare function getTranslation(locale: Locale, id: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export function getTranslation(_0x3816ad,_0x504b3b){const t=_0x3816ad['t'];switch(_0x504b3b){case'Edit\x20source\x20modal\x20label':return t({'string':'Edit\x20source','id':'Edit\x20source\x20modal\x20label'});case'Source':return t('Source');case'Source\x20Editing\x20Enhanced':return t('Source\x20Editing\x20Enhanced');case'Copy\x20line\x20down':return t('Copy\x20line\x20down');case'Copy\x20line\x20up':return t('Copy\x20line\x20up');case'Delete\x20line':return t('Delete\x20line');case'Indent\x20less':return t('Indent\x20less');case'Indent\x20more':return t('Indent\x20more');case'Fold\x20all':return t('Fold\x20all');case'Fold\x20code\x20(current\x20level)':return t('Fold\x20code\x20(current\x20level)');case'Move\x20line\x20down':return t('Move\x20line\x20down');case'Move\x20line\x20up':return t('Move\x20line\x20up');case'Redo\x20(keystroke)':return t({'id':'Redo\x20(keystroke)','string':'Redo'});case'Select\x20line':return t('Select\x20line');case'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':return t('Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode');case'Toggle\x20block\x20comment':return t('Toggle\x20block\x20comment');case'Toggle\x20comment':return t('Toggle\x20comment');case'Undo\x20(keystroke)':return t({'id':'Undo\x20(keystroke)','string':'Undo'});case'Unfold\x20all':return t('Unfold\x20all');case'Unfold\x20code\x20(current\x20level)':return t('Unfold\x20code\x20(current\x20level)');case'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':return t('Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.');case'Cancel':return t('Cancel');case'Save':return t('Save');default:return _0x504b3b;}}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Extension } from '@codemirror/state';
|
|
6
|
+
import type { SourceEditingEnhancedConfig } from '../sourceeditingenhancedconfig.js';
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of the CodeMirror in a specified parent element.
|
|
9
|
+
*
|
|
10
|
+
* It returns an object with the interface to interact with the editor.
|
|
11
|
+
*/
|
|
12
|
+
export default function createCodeMirrorEditor(options: CodeMirrorEditorConfig): CodeMirrorEditorApi;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a set of keybindings for the CodeMirror editor.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getKeybindings(): Array<Extension>;
|
|
17
|
+
/**
|
|
18
|
+
* The interface of the CodeMirror editor that allows interacting with the instance.
|
|
19
|
+
*/
|
|
20
|
+
export type CodeMirrorEditorApi = {
|
|
21
|
+
/**
|
|
22
|
+
* Focuses the code editor.
|
|
23
|
+
*/
|
|
24
|
+
focus: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves data from the editor.
|
|
27
|
+
*/
|
|
28
|
+
getData: () => string;
|
|
29
|
+
/**
|
|
30
|
+
* Sets data to the editor.
|
|
31
|
+
*/
|
|
32
|
+
setData: (data: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Toggles the read-only state of the editor.
|
|
35
|
+
*/
|
|
36
|
+
setReadOnly: (readonly: boolean) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Destroys the editor instance.
|
|
39
|
+
*/
|
|
40
|
+
destroy: () => void;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The configuration of the CodeMirror instance.
|
|
44
|
+
*/
|
|
45
|
+
export type CodeMirrorEditorConfig = {
|
|
46
|
+
/**
|
|
47
|
+
* The parent DOM element hosting the editor.
|
|
48
|
+
*/
|
|
49
|
+
parent: HTMLElement;
|
|
50
|
+
/**
|
|
51
|
+
* The syntax highlighting language of the editor.
|
|
52
|
+
*/
|
|
53
|
+
syntaxLanguage: 'html' | 'markdown';
|
|
54
|
+
/**
|
|
55
|
+
* The theme of the editor.
|
|
56
|
+
*/
|
|
57
|
+
theme?: SourceEditingEnhancedConfig['theme'];
|
|
58
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x1d02(){const _0x412967=['192024QzHCHr','3DZntbb','Cmd-y','30XRiKel','length','1069982LWMNSS','568OJaRjF','focus','4560212kVpHnI','2000eMmPhW','syntaxLanguage','reconfigure','doc','parent','editable','push','toString','9951534fQXJeA','theme','dispatch','32466olrgxM','html','lineWrapping','addToHistory','75713vVndbQ','Ctrl-Shift-z','state','943588PFIDNV','destroy'];_0x1d02=function(){return _0x412967;};return _0x1d02();}(function(_0x939429,_0x3110a3){const _0x45896d=_0x23ce,_0x52bb7a=_0x939429();while(!![]){try{const _0x4af6c2=parseInt(_0x45896d(0x9e))/0x1+-parseInt(_0x45896d(0xa5))/0x2*(parseInt(_0x45896d(0xa1))/0x3)+parseInt(_0x45896d(0xa8))/0x4+parseInt(_0x45896d(0xa3))/0x5*(-parseInt(_0x45896d(0xa0))/0x6)+-parseInt(_0x45896d(0x97))/0x7*(parseInt(_0x45896d(0xa6))/0x8)+parseInt(_0x45896d(0x94))/0x9+-parseInt(_0x45896d(0x8c))/0xa*(parseInt(_0x45896d(0x9b))/0xb);if(_0x4af6c2===_0x3110a3)break;else _0x52bb7a['push'](_0x52bb7a['shift']());}catch(_0x1bef9e){_0x52bb7a['push'](_0x52bb7a['shift']());}}}(_0x1d02,0xb8ae6));import{lineNumbers as _0x194a08,highlightActiveLineGutter as _0x33576b,highlightSpecialChars as _0x1828b1,drawSelection as _0x31a299,dropCursor as _0x291d42,rectangularSelection as _0x4ecbe5,crosshairCursor as _0x3991ba,highlightActiveLine as _0x4a27fb,keymap as _0x346097,EditorView as _0x7d33e7}from'@codemirror/view';import{Compartment as _0x160bba,Transaction as _0x1e3942}from'@codemirror/state';import{foldGutter as _0x5930bc,indentOnInput as _0x3b9cdb,syntaxHighlighting as _0x5a7969,defaultHighlightStyle as _0x25abcc,bracketMatching as _0x4b372f,foldKeymap as _0x1b6e32}from'@codemirror/language';import{history as _0x2bcf9f,defaultKeymap as _0x4c3391,historyKeymap as _0x4e43d1,redo as _0x129053}from'@codemirror/commands';import{closeBrackets as _0x57221c,autocompletion as _0x128f04,closeBracketsKeymap as _0x43e052,completionKeymap as _0x5e3d0f}from'@codemirror/autocomplete';import{html as _0x1487d8}from'@codemirror/lang-html';import{markdown as _0x219e3f}from'@codemirror/lang-markdown';export default function p(_0x16d0c9){const _0x2746fc=_0x23ce,_0x37233b=[_0x7d33e7[_0x2746fc(0x99)],_0x128f04(),_0x4b372f(),_0x57221c(),_0x3991ba(),_0x31a299(),_0x291d42(),_0x194a08(),_0x5930bc(),_0x4a27fb(),_0x33576b(),_0x1828b1(),_0x2bcf9f(),_0x3b9cdb(),_0x4ecbe5(),_0x5a7969(_0x25abcc,{'fallback':!0x0})],_0x46ffbf=new _0x160bba();_0x37233b[_0x2746fc(0x92)](_0x46ffbf['of'](_0x7d33e7[_0x2746fc(0x91)]['of'](!0x0))),_0x2746fc(0x98)===_0x16d0c9[_0x2746fc(0x8d)]?_0x37233b[_0x2746fc(0x92)](_0x1487d8()):_0x37233b[_0x2746fc(0x92)](_0x219e3f()),_0x16d0c9[_0x2746fc(0x95)]&&_0x37233b[_0x2746fc(0x92)](_0x16d0c9[_0x2746fc(0x95)]),_0x37233b[_0x2746fc(0x92)](...getKeybindings());const _0xbecc85=new _0x7d33e7({'extensions':_0x37233b,'parent':_0x16d0c9[_0x2746fc(0x90)]});return{'focus':()=>{const _0x5de9a=_0x2746fc;_0xbecc85[_0x5de9a(0x96)]({'selection':{'anchor':0x0},'scrollIntoView':!0x0}),_0xbecc85[_0x5de9a(0xa7)]();},'getData':()=>_0xbecc85[_0x2746fc(0x9d)][_0x2746fc(0x8f)][_0x2746fc(0x93)](),'setData':_0x14c137=>{const _0xc198e7=_0x2746fc;_0xbecc85[_0xc198e7(0x96)]({'changes':{'from':0x0,'to':_0xbecc85[_0xc198e7(0x9d)][_0xc198e7(0x8f)][_0xc198e7(0xa4)],'insert':_0x14c137},'annotations':_0x1e3942[_0xc198e7(0x9a)]['of'](!0x1)});},'setReadOnly':_0x299cd2=>{const _0x53b973=_0x2746fc;_0xbecc85[_0x53b973(0x96)]({'effects':[_0x46ffbf[_0x53b973(0x8e)](_0x7d33e7[_0x53b973(0x91)]['of'](!_0x299cd2))]});},'destroy':()=>{const _0x37df26=_0x2746fc;_0xbecc85[_0x37df26(0x9f)]();}};}function _0x23ce(_0x4208a3,_0x3b131d){const _0x1d02a7=_0x1d02();return _0x23ce=function(_0x23cea2,_0xbb03e7){_0x23cea2=_0x23cea2-0x8c;let _0x70bcc=_0x1d02a7[_0x23cea2];return _0x70bcc;},_0x23ce(_0x4208a3,_0x3b131d);}export function getKeybindings(){const _0x407eb4=_0x23ce;return[_0x346097['of']([..._0x43e052,..._0x4c3391,..._0x4e43d1,..._0x1b6e32,..._0x5e3d0f,{'key':_0x407eb4(0x9c),'mac':_0x407eb4(0xa2),'run':_0x129053,'preventDefault':!0x0}])];}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module source-editing-enhanced/utils/format
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Formats the content for a better readability.
|
|
10
|
+
*
|
|
11
|
+
* For a non-HTML source the unchanged input string is returned.
|
|
12
|
+
*
|
|
13
|
+
* @param input Input string to check.
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatSource(input: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Unformats the given HTML by removing new lines and multiple whitespace characters.
|
|
18
|
+
*
|
|
19
|
+
* For a non-HTML source the unchanged input string is returned.
|
|
20
|
+
*
|
|
21
|
+
* @param input Input string to check.
|
|
22
|
+
*/
|
|
23
|
+
export declare function unformatSource(input: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily
|
|
26
|
+
* parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements
|
|
27
|
+
* (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
|
28
|
+
* and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.
|
|
29
|
+
*
|
|
30
|
+
* WARNING: This function works only on a text that does not contain any indentations or new lines.
|
|
31
|
+
* Calling this function on the already formatted text will damage the formatting.
|
|
32
|
+
*
|
|
33
|
+
* @param input An HTML string to format.
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatHtml(input: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x3750e9=_0x12e6;(function(_0x193e69,_0x462aeb){const _0x4476ea=_0x12e6,_0x320c3a=_0x193e69();while(!![]){try{const _0x5a0af2=parseInt(_0x4476ea(0x68))/0x1+-parseInt(_0x4476ea(0x70))/0x2*(parseInt(_0x4476ea(0x94))/0x3)+-parseInt(_0x4476ea(0x80))/0x4*(-parseInt(_0x4476ea(0x7c))/0x5)+parseInt(_0x4476ea(0x98))/0x6+-parseInt(_0x4476ea(0x78))/0x7*(-parseInt(_0x4476ea(0x87))/0x8)+-parseInt(_0x4476ea(0x74))/0x9+-parseInt(_0x4476ea(0x6a))/0xa;if(_0x5a0af2===_0x462aeb)break;else _0x320c3a['push'](_0x320c3a['shift']());}catch(_0x1a173e){_0x320c3a['push'](_0x320c3a['shift']());}}}(_0x4591,0x1cda3));function _0x12e6(_0x62583d,_0x2a5eca){const _0x459186=_0x4591();return _0x12e6=function(_0x12e6e7,_0x40fd32){_0x12e6e7=_0x12e6e7-0x65;let _0x49ae3e=_0x459186[_0x12e6e7];return _0x49ae3e;},_0x12e6(_0x62583d,_0x2a5eca);}export function formatSource(_0x5478fe){return $(_0x5478fe)?formatHtml(_0x5478fe):_0x5478fe;}export function unformatSource(_0x3ff29e){const _0xab202c=_0x12e6;return $(_0x3ff29e[_0xab202c(0x79)](/^[\n\s]*/g,''))?_0x3ff29e[_0xab202c(0x79)](/\s+/g,''):_0x3ff29e;}export function formatHtml(_0x20196f){const _0x33f7f0=_0x12e6,_0x366b93=[{'name':_0x33f7f0(0x8c),'isVoid':!0x1},{'name':_0x33f7f0(0x7f),'isVoid':!0x1},{'name':_0x33f7f0(0x90),'isVoid':!0x1},{'name':_0x33f7f0(0x6b),'isVoid':!0x1},{'name':_0x33f7f0(0x82),'isVoid':!0x1},{'name':_0x33f7f0(0x8d),'isVoid':!0x1},{'name':'dd','isVoid':!0x1},{'name':_0x33f7f0(0x8f),'isVoid':!0x1},{'name':'dl','isVoid':!0x1},{'name':'dt','isVoid':!0x1},{'name':_0x33f7f0(0x99),'isVoid':!0x1},{'name':_0x33f7f0(0x95),'isVoid':!0x1},{'name':_0x33f7f0(0x77),'isVoid':!0x1},{'name':_0x33f7f0(0x76),'isVoid':!0x1},{'name':_0x33f7f0(0x71),'isVoid':!0x1},{'name':'h1','isVoid':!0x1},{'name':'h2','isVoid':!0x1},{'name':'h3','isVoid':!0x1},{'name':'h4','isVoid':!0x1},{'name':'h5','isVoid':!0x1},{'name':'h6','isVoid':!0x1},{'name':_0x33f7f0(0x92),'isVoid':!0x1},{'name':_0x33f7f0(0x83),'isVoid':!0x1},{'name':'hr','isVoid':!0x0},{'name':'li','isVoid':!0x1},{'name':_0x33f7f0(0x65),'isVoid':!0x1},{'name':_0x33f7f0(0x75),'isVoid':!0x1},{'name':'ol','isVoid':!0x1},{'name':'p','isVoid':!0x1},{'name':_0x33f7f0(0x6d),'isVoid':!0x1},{'name':_0x33f7f0(0x67),'isVoid':!0x1},{'name':_0x33f7f0(0x6e),'isVoid':!0x1},{'name':'td','isVoid':!0x1},{'name':'th','isVoid':!0x1},{'name':_0x33f7f0(0x66),'isVoid':!0x1},{'name':'tr','isVoid':!0x1},{'name':'ul','isVoid':!0x1}],_0x686fcd=_0x366b93[_0x33f7f0(0x89)](_0x5c288a=>_0x5c288a[_0x33f7f0(0x96)])[_0x33f7f0(0x73)]('|'),_0x48f97b=_0x20196f[_0x33f7f0(0x79)](new RegExp(_0x33f7f0(0x86)+_0x686fcd+_0x33f7f0(0x81),'g'),_0x33f7f0(0x7d))[_0x33f7f0(0x79)](/<br[^>]*>/g,_0x33f7f0(0x88))[_0x33f7f0(0x8a)]('\x0a');let _0x5044e6=0x0,_0x20997f=!0x1;return _0x48f97b[_0x33f7f0(0x7e)](_0x4c22fb=>_0x4c22fb[_0x33f7f0(0x85)])[_0x33f7f0(0x89)](_0x432831=>(_0x20997f=function(_0x171623,_0x53e1eb){const _0x490809=_0x33f7f0;return new RegExp(_0x490809(0x8e))[_0x490809(0x91)](_0x171623)?_0x490809(0x69):new RegExp(_0x490809(0x7b))[_0x490809(0x91)](_0x171623)?_0x490809(0x6c):(_0x490809(0x69)===_0x53e1eb||_0x490809(0x84)===_0x53e1eb)&&_0x490809(0x84);}(_0x432831,_0x20997f),function(_0x386ba6,_0x2f51c3){const _0x4967ec=_0x33f7f0;return _0x2f51c3[_0x4967ec(0x97)](_0x5c846d=>!_0x5c846d[_0x4967ec(0x7a)]&&!!new RegExp('<'+_0x5c846d[_0x4967ec(0x96)]+_0x4967ec(0x72))[_0x4967ec(0x91)](_0x386ba6));}(_0x432831,_0x366b93)?X(_0x432831,_0x5044e6++):function(_0x1f16c5,_0x456cbc){const _0x5d497b=_0x33f7f0;return _0x456cbc[_0x5d497b(0x97)](_0xaa136a=>new RegExp('</'+_0xaa136a[_0x5d497b(0x96)]+'>')[_0x5d497b(0x91)](_0x1f16c5));}(_0x432831,_0x366b93)?X(_0x432831,--_0x5044e6):_0x33f7f0(0x84)===_0x20997f||_0x33f7f0(0x6c)===_0x20997f?_0x432831:X(_0x432831,_0x5044e6)))[_0x33f7f0(0x73)]('\x0a');}function $(_0xe1f38b){const _0x39bbe3=_0x12e6;return _0xe1f38b[_0x39bbe3(0x93)]('<');}function _0x4591(){const _0x44ef04=['</pre>','605eSbNtG','\x0a$&\x0a','filter','article','4052bRxOkv',')(\x20.*?)?>','details','hgroup','middle','length','</?(','3904IVnsGg','$&\x0a','map','split','max','address','dialog','<pre(\x20.*?)?>','div','aside','test','header','startsWith','666LLjKAj','figcaption','name','some','862920GUtikF','fieldset','\x20\x20\x20\x20','main','thead','table','76056CCTNyR','first','31670gdfgPL','blockquote','last','section','tbody','repeat','974WXfljF','form','(\x20.*?)?>','join','1948005RzFcGT','nav','footer','figure','1484VlqzZZ','replace','isVoid'];_0x4591=function(){return _0x44ef04;};return _0x4591();}function X(_0x32fd32,_0x4e3927,_0x2e24bd=_0x3750e9(0x9a)){const _0x4ebe1c=_0x3750e9;return''+_0x2e24bd[_0x4ebe1c(0x6f)](Math[_0x4ebe1c(0x8b)](0x0,_0x4e3927))+_0x32fd32;}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
/**
|
|
7
|
+
* Returns the name of the currently or most recently active root (the root the selection is anchored to).
|
|
8
|
+
*/
|
|
9
|
+
export declare function getActiveRootName(editor: Editor): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x27b2(_0x48ea41,_0x554c9f){const _0x19c75c=_0x19c7();return _0x27b2=function(_0x27b23c,_0x30856c){_0x27b23c=_0x27b23c-0x1b6;let _0x5bf6c6=_0x19c75c[_0x27b23c];return _0x5bf6c6;},_0x27b2(_0x48ea41,_0x554c9f);}(function(_0x4d6b49,_0x5d1d6a){const _0x216a09=_0x27b2,_0x130de4=_0x4d6b49();while(!![]){try{const _0x52f1dc=parseInt(_0x216a09(0x1cb))/0x1*(-parseInt(_0x216a09(0x1b8))/0x2)+-parseInt(_0x216a09(0x1c1))/0x3*(parseInt(_0x216a09(0x1c6))/0x4)+parseInt(_0x216a09(0x1cc))/0x5+parseInt(_0x216a09(0x1be))/0x6*(parseInt(_0x216a09(0x1b9))/0x7)+parseInt(_0x216a09(0x1c8))/0x8*(-parseInt(_0x216a09(0x1bc))/0x9)+parseInt(_0x216a09(0x1bb))/0xa*(parseInt(_0x216a09(0x1ce))/0xb)+-parseInt(_0x216a09(0x1ca))/0xc*(-parseInt(_0x216a09(0x1c9))/0xd);if(_0x52f1dc===_0x5d1d6a)break;else _0x130de4['push'](_0x130de4['shift']());}catch(_0x2b77c7){_0x130de4['push'](_0x130de4['shift']());}}}(_0x19c7,0x4e227));function _0x19c7(){const _0x5a4811=['length','9520ZFTgjE','from','8uOUfaQ','403OaWEBt','142932ELuShO','1Gbnsmv','1142635KbhsxF','view','6160099zNPNaN','rootName','document','433626IgYTJE','211918ZWsqpa','source-editing-enhanced-editor-no-root','10sNKEws','1595655ElZWVp','selection','30DuqkyK','roots','getRanges','750eKmjeG','first','root','editing'];_0x19c7=function(){return _0x5a4811;};return _0x19c7();}import{CKEditorError as _0x4c7481}from'ckeditor5/src/utils.js';export function getActiveRootName(_0x1efb9b){const _0x51fdfb=_0x27b2,_0x315805=_0x1efb9b[_0x51fdfb(0x1c4)][_0x51fdfb(0x1cd)][_0x51fdfb(0x1b7)][_0x51fdfb(0x1bf)],_0x57f561=_0x315805[_0x51fdfb(0x1c5)];if(0x0===_0x57f561)throw new _0x4c7481(_0x51fdfb(0x1ba),_0x1efb9b);if(0x1===_0x57f561)return _0x315805[_0x51fdfb(0x1c2)][_0x51fdfb(0x1b6)];return Array[_0x51fdfb(0x1c7)](_0x1efb9b[_0x51fdfb(0x1c4)][_0x51fdfb(0x1cd)][_0x51fdfb(0x1b7)][_0x51fdfb(0x1bd)][_0x51fdfb(0x1c0)]())[0x0][_0x51fdfb(0x1c3)][_0x51fdfb(0x1b6)];}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
3
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
4
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css";
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
/* Keep the editor as big as possible within the limits of the dialog system geometry. */
|
|
14
|
+
--ck-source-editing-enhanced-height: calc(
|
|
15
|
+
var(--ck-dialog-max-height) /* ─▶ Total max height of the dialog */
|
|
16
|
+
- var(--ck-form-header-height) /* ─▶ Height of the dialog header */
|
|
17
|
+
- 2 * var(--ck-spacing-large) /* ─┐ */
|
|
18
|
+
- var(--ck-ui-component-min-height) /* ├─▶ Height of the dialog actions bar */
|
|
19
|
+
- 2 * var(--ck-spacing-tiny) /* ─┘ */
|
|
20
|
+
);
|
|
21
|
+
--ck-source-editing-enhanced-width: min(80vw, 1200px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ck.ck-code-editor {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
white-space: initial;
|
|
30
|
+
margin: 0 auto;
|
|
31
|
+
border-bottom: 1px solid var(--ck-color-base-border);
|
|
32
|
+
height: var(--ck-source-editing-enhanced-height);
|
|
33
|
+
width: var(--ck-source-editing-enhanced-width);
|
|
34
|
+
|
|
35
|
+
/* Styles of the CodeMirror editor */
|
|
36
|
+
& .cm-editor {
|
|
37
|
+
flex-grow: 1;
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
&.cm-focused {
|
|
41
|
+
outline: var(--ck-focus-ring);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|