@ckeditor/ckeditor5-template
Version:
Template feature for CKEditor 5.
23 lines • 5.24 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x3c85d0=_0x82e1;(function(_0x8951f8,_0x1e1e8e){const _0x22eb8e=_0x82e1,_0x50ca9f=_0x8951f8();while(!![]){try{const _0x56cc6b=parseInt(_0x22eb8e(0x12d))/0x1*(-parseInt(_0x22eb8e(0x115))/0x2)+parseInt(_0x22eb8e(0x125))/0x3+-parseInt(_0x22eb8e(0x10d))/0x4+parseInt(_0x22eb8e(0x116))/0x5+-parseInt(_0x22eb8e(0x12e))/0x6*(-parseInt(_0x22eb8e(0x134))/0x7)+-parseInt(_0x22eb8e(0x11e))/0x8*(-parseInt(_0x22eb8e(0x120))/0x9)+-parseInt(_0x22eb8e(0x130))/0xa*(parseInt(_0x22eb8e(0x12a))/0xb);if(_0x56cc6b===_0x1e1e8e)break;else _0x50ca9f['push'](_0x50ca9f['shift']());}catch(_0x1e2638){_0x50ca9f['push'](_0x50ca9f['shift']());}}}(_0xac95,0x8e165));import{IconTemplateGeneric as _0x31e7b2}from'ckeditor5/src/icons.js';function _0x82e1(_0xc296c5,_0x5abd19){const _0xac9501=_0xac95();return _0x82e1=function(_0x82e1bd,_0x501dba){_0x82e1bd=_0x82e1bd-0x10c;let _0x2c0d9d=_0xac9501[_0x82e1bd];return _0x2c0d9d;},_0x82e1(_0xc296c5,_0x5abd19);}function _0xac95(){const _0x5684dd=['2167ZdIHpw','div','ck-template-form__description','14077HCImSm','2777226wOiSdj','push','45310QzCIdZ','option','element','description','7mtpIJg','render','set','705664sWejdc','iconView','ck-template-button','span','locale','remove','labelView','descriptionView','136uwCcvI','2754555KBNWXz','setTemplate','add','text','titleView','title','isMatching','ck-button__label','6830512rcnOFG','textPartView','9wsSBNw','match','extendTemplate','children','ck-template-form__text-part','2221956OrPKqF','destroy','highlightText','templateDefinition','isColorInherited'];_0xac95=function(){return _0x5684dd;};return _0xac95();}import{ButtonView as _0x195f0a,HighlightedTextView as _0x4233e6,View as _0x5a85eb}from'ckeditor5/src/ui.js';export default class g extends _0x195f0a{[_0x3c85d0(0x128)];[_0x3c85d0(0x11f)];constructor(_0x173c62,_0x4dfddf){const _0x21782b=_0x3c85d0;super(_0x173c62),this[_0x21782b(0x128)]=_0x4dfddf,this[_0x21782b(0x11f)]=null;const {icon:_0x524e9a=_0x31e7b2}=_0x4dfddf;this[_0x21782b(0x10c)]({'withText':!0x0,'class':_0x21782b(0x10f),'role':_0x21782b(0x131),'icon':_0x524e9a}),this[_0x21782b(0x10e)][_0x21782b(0x129)]=!0x1;}[_0x3c85d0(0x135)](){const _0x436397=_0x3c85d0;super[_0x436397(0x135)](),this[_0x436397(0x11f)]=new TextPartView(this[_0x436397(0x111)],this[_0x436397(0x128)],this[_0x436397(0x113)][_0x436397(0x132)]['id']),this[_0x436397(0x123)][_0x436397(0x112)](this[_0x436397(0x113)]),this[_0x436397(0x123)][_0x436397(0x118)](this[_0x436397(0x11f)]);}[_0x3c85d0(0x126)](){const _0x5dc126=_0x3c85d0;super[_0x5dc126(0x126)](),this[_0x5dc126(0x113)][_0x5dc126(0x126)]();}[_0x3c85d0(0x11c)](_0x4df942){const _0x578976=_0x3c85d0,{title:_0x3f4fac,description:_0x67b09f}=this[_0x578976(0x128)],_0x517672=!!_0x3f4fac[_0x578976(0x121)](_0x4df942),_0x1a1188=!(!_0x67b09f||!_0x67b09f[_0x578976(0x121)](_0x4df942));return _0x517672||_0x1a1188?{'title':_0x517672,'description':_0x1a1188}:null;}[_0x3c85d0(0x127)](_0xe29d49){const _0x3134f6=_0x3c85d0;this[_0x3134f6(0x11f)][_0x3134f6(0x127)](_0xe29d49);}}export class TextPartView extends _0x5a85eb{constructor(_0x15c95d,_0x2f5f07,_0x286b00){const _0x51f9a6=_0x3c85d0;super(_0x15c95d),this[_0x51f9a6(0x11b)]=_0x2f5f07[_0x51f9a6(0x11b)],this[_0x51f9a6(0x133)]=_0x2f5f07[_0x51f9a6(0x133)],this[_0x51f9a6(0x11a)]=new _0x4233e6(),this[_0x51f9a6(0x11a)][_0x51f9a6(0x119)]=this[_0x51f9a6(0x11b)],this[_0x51f9a6(0x11a)][_0x51f9a6(0x122)]({'tag':_0x51f9a6(0x110),'attributes':{'class':[_0x51f9a6(0x11d)],'id':_0x286b00}});const _0x147585=[this[_0x51f9a6(0x11a)]];this[_0x51f9a6(0x133)]&&(this[_0x51f9a6(0x114)]=new _0x4233e6(),this[_0x51f9a6(0x114)][_0x51f9a6(0x119)]=this[_0x51f9a6(0x133)],this[_0x51f9a6(0x114)][_0x51f9a6(0x122)]({'tag':'p','attributes':{'class':[_0x51f9a6(0x12c)]}}),_0x147585[_0x51f9a6(0x12f)](this[_0x51f9a6(0x114)])),this[_0x51f9a6(0x117)]({'tag':_0x51f9a6(0x12b),'attributes':{'class':['ck',_0x51f9a6(0x124)]},'children':_0x147585});}[_0x3c85d0(0x127)](_0x346b40){const _0x44ef2e=_0x3c85d0;this[_0x44ef2e(0x11a)][_0x44ef2e(0x127)](_0x346b40),this[_0x44ef2e(0x133)]&&this[_0x44ef2e(0x114)][_0x44ef2e(0x127)](_0x346b40);}}