@ckeditor/ckeditor5-template
Version:
Template feature for CKEditor 5.
23 lines • 5.09 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 _0x27ce44=_0xc7bc;(function(_0xf9a21b,_0x52adfb){const _0x928d1b=_0xc7bc,_0x4bbf4f=_0xf9a21b();while(!![]){try{const _0x5c642d=-parseInt(_0x928d1b(0xdd))/0x1+parseInt(_0x928d1b(0xd6))/0x2+-parseInt(_0x928d1b(0xf7))/0x3+-parseInt(_0x928d1b(0xe9))/0x4+-parseInt(_0x928d1b(0xde))/0x5+-parseInt(_0x928d1b(0xe4))/0x6*(-parseInt(_0x928d1b(0xe2))/0x7)+parseInt(_0x928d1b(0xf6))/0x8*(parseInt(_0x928d1b(0xee))/0x9);if(_0x5c642d===_0x52adfb)break;else _0x4bbf4f['push'](_0x4bbf4f['shift']());}catch(_0x54efba){_0x4bbf4f['push'](_0x4bbf4f['shift']());}}}(_0xebf9,0x63b74));import{IconTemplateGeneric as _0x3078ae}from'ckeditor5/src/icons.js';function _0xebf9(){const _0x545bc8=['descriptionView','add','push','1336590sditwM','div','ck-template-button','locale','match','textPartView','element','labelView','8KDwucl','940023TfbMio','setTemplate','iconView','ck-button__label','span','text','option','1436894hnFzVh','render','extendTemplate','isColorInherited','isMatching','description','destroy','149290wuYGed','1648840wYPIgI','children','templateDefinition','title','817348UwoXhT','titleView','18zQZhxX','highlightText','ck-template-form__text-part','remove','ck-template-form__description','65656XbKxzz','set'];_0xebf9=function(){return _0x545bc8;};return _0xebf9();}function _0xc7bc(_0x23c883,_0x19d270){const _0xebf988=_0xebf9();return _0xc7bc=function(_0xc7bce7,_0x5c4109){_0xc7bce7=_0xc7bce7-0xd5;let _0x15740e=_0xebf988[_0xc7bce7];return _0x15740e;},_0xc7bc(_0x23c883,_0x19d270);}import{ButtonView as _0x43571b,HighlightedTextView as _0x23a08c,View as _0x23f185}from'ckeditor5/src/ui.js';export class TemplateListButtonView extends _0x43571b{[_0x27ce44(0xe0)];[_0x27ce44(0xf3)];constructor(_0x12dbac,_0x121d69){const _0x19e9be=_0x27ce44;super(_0x12dbac),this[_0x19e9be(0xe0)]=_0x121d69,this[_0x19e9be(0xf3)]=null;const {icon:_0x421960=_0x3078ae}=_0x121d69;this[_0x19e9be(0xea)]({'withText':!0x0,'class':_0x19e9be(0xf0),'role':_0x19e9be(0xd5),'icon':_0x421960}),this[_0x19e9be(0xf9)][_0x19e9be(0xd9)]=!0x1;}[_0x27ce44(0xd7)](){const _0x460bb0=_0x27ce44;super[_0x460bb0(0xd7)](),this[_0x460bb0(0xf3)]=new TextPartView(this[_0x460bb0(0xf1)],this[_0x460bb0(0xe0)],this[_0x460bb0(0xf5)][_0x460bb0(0xf4)]['id']),this[_0x460bb0(0xdf)][_0x460bb0(0xe7)](this[_0x460bb0(0xf5)]),this[_0x460bb0(0xdf)][_0x460bb0(0xec)](this[_0x460bb0(0xf3)]);}[_0x27ce44(0xdc)](){const _0x5a5715=_0x27ce44;super[_0x5a5715(0xdc)](),this[_0x5a5715(0xf5)][_0x5a5715(0xdc)]();}[_0x27ce44(0xda)](_0x5ded23){const _0x4dceca=_0x27ce44,{title:_0x12036d,description:_0x151f1d}=this[_0x4dceca(0xe0)],_0x5e7c59=!!_0x12036d[_0x4dceca(0xf2)](_0x5ded23),_0x5a500f=!(!_0x151f1d||!_0x151f1d[_0x4dceca(0xf2)](_0x5ded23));return _0x5e7c59||_0x5a500f?{'title':_0x5e7c59,'description':_0x5a500f}:null;}[_0x27ce44(0xe5)](_0x58147c){const _0x387c3f=_0x27ce44;this[_0x387c3f(0xf3)][_0x387c3f(0xe5)](_0x58147c);}}export class TextPartView extends _0x23f185{constructor(_0x28b89a,_0x3b1cfb,_0x2a5700){const _0xf508b6=_0x27ce44;super(_0x28b89a),this[_0xf508b6(0xe1)]=_0x3b1cfb[_0xf508b6(0xe1)],this[_0xf508b6(0xdb)]=_0x3b1cfb[_0xf508b6(0xdb)],this[_0xf508b6(0xe3)]=new _0x23a08c(),this[_0xf508b6(0xe3)][_0xf508b6(0xfc)]=this[_0xf508b6(0xe1)],this[_0xf508b6(0xe3)][_0xf508b6(0xd8)]({'tag':_0xf508b6(0xfb),'attributes':{'class':[_0xf508b6(0xfa)],'id':_0x2a5700}});const _0x2e3b35=[this[_0xf508b6(0xe3)]];this[_0xf508b6(0xdb)]&&(this[_0xf508b6(0xeb)]=new _0x23a08c(),this[_0xf508b6(0xeb)][_0xf508b6(0xfc)]=this[_0xf508b6(0xdb)],this[_0xf508b6(0xeb)][_0xf508b6(0xd8)]({'tag':'p','attributes':{'class':[_0xf508b6(0xe8)]}}),_0x2e3b35[_0xf508b6(0xed)](this[_0xf508b6(0xeb)])),this[_0xf508b6(0xf8)]({'tag':_0xf508b6(0xef),'attributes':{'class':['ck',_0xf508b6(0xe6)]},'children':_0x2e3b35});}[_0x27ce44(0xe5)](_0x3be870){const _0x2b3cb8=_0x27ce44;this[_0x2b3cb8(0xe3)][_0x2b3cb8(0xe5)](_0x3be870),this[_0x2b3cb8(0xdb)]&&this[_0x2b3cb8(0xeb)][_0x2b3cb8(0xe5)](_0x3be870);}}