{"version":3,"sources":["keditor-component-text.js"],"names":["$","KEditor","keditor","flog","log","CKEDITOR","disableAutoInline","components","options","toolbarGroups","name","groups","title","allowedContent","bodyId","templates_replaceContent","enterMode","forceEnterMode","format_tags","removePlugins","removeButtons","minimumChangeMilliseconds","init","contentArea","container","component","self","this","componentContent","children","prop","on","e","onComponentChanged","call","onContainerChanged","onContentChanged","editor","ckeditor","onComponentReady","getContent","find","id","attr","instances","getData","html","destroy","jQuery"],"mappings":"CAAA,SAAWA,GACP,GAAIC,GAAUD,EAAEE,QACZC,EAAOF,EAAQG,GAEnBC,UAASC,mBAAoB,EAI7BL,EAAQM,WAAiB,MACrBC,SACIC,gBACKC,KAAM,WAAYC,QAAS,OAAQ,WAAY,cAC/CD,KAAM,UAAWC,QAAS,OAAQ,YAAa,eAAgB,aAC/DD,KAAM,QAASC,QAAS,WACxBD,KAAM,cAAeC,QAAS,cAAe,aAC7CD,KAAM,YAAaC,QAAS,OAAQ,SAAU,SAAU,QAAS,OAAQ,eACzED,KAAM,QAASC,QAAS,WACxBD,KAAM,SAAUC,QAAS,WAC1B,KACCD,KAAM,YAAaC,QAAS,YAAa,UACzCD,KAAM,SAAUC,QAAS,YACzBD,KAAM,SAAUC,QAAS,YACzBD,KAAM,QAASC,QAAS,WACxBD,KAAM,SAAUC,QAAS,YAE9BC,OAAO,EACPC,gBAAgB,EAChBC,OAAQ,SACRC,0BAA0B,EAC1BC,UAAW,IACXC,gBAAgB,EAChBC,YAAa,sBACbC,cAAe,6BACfC,cAAe,iXACfC,0BAA2B,KAG/BC,KAAM,SAAUC,EAAaC,EAAWC,EAAWvB,GAC/CC,EAAK,wBAAyBsB,EAE9B,IAAIC,GAAOC,KACPnB,EAAUN,EAAQM,QAElBoB,EAAmBH,EAAUI,SAAS,6BAC1CD,GAAiBE,KAAK,mBAAmB,GAEzCF,EAAiBG,GAAG,QAAS,SAAUC,GACO,kBAA/BxB,GAAQyB,oBACfzB,EAAQyB,mBAAmBC,KAAKX,EAAaS,EAAGP,GAGV,kBAA/BjB,GAAQ2B,oBACf3B,EAAQ2B,mBAAmBD,KAAKX,EAAaS,EAAGR,GAGZ,kBAA7BhB,GAAQ4B,kBACf5B,EAAQ4B,iBAAiBF,KAAKX,EAAaS,IAInD,IAAIK,GAAST,EAAiBU,SAASZ,EAAKlB,SAAS6B,MACrDA,GAAON,GAAG,gBAAiB,WACvB5B,EAAK,oBAAqBsB,GAEc,kBAA7BjB,GAAQ+B,kBACf/B,EAAQ+B,iBAAiBL,KAAKX,EAAaE,EAAWY,MAKlEG,WAAY,SAAUf,EAAWvB,GAC7BC,EAAK,8BAA+BsB,EAEpC,IAAIG,GAAmBH,EAAUgB,KAAK,8BAClCC,EAAKd,EAAiBe,KAAK,MAC3BN,EAAShC,SAASuC,UAAUF,EAChC,OAAIL,GACOA,EAAOQ,UAEPjB,EAAiBkB,QAIhCC,QAAS,SAAUtB,EAAWvB,GAC1BC,EAAK,2BAA4BsB,EAEjC,IAAIiB,GAAKjB,EAAUgB,KAAK,8BAA8BE,KAAK,MACvDN,EAAShC,SAASuC,UAAUF,EAC5BL,IACAA,EAAOU,aAKpBC","file":"keditor-component-text.min.js","sourcesContent":["(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n\r\n CKEDITOR.disableAutoInline = true;\r\n\r\n // Text component\r\n // ---------------------------------------------------------------------\r\n KEditor.components['text'] = {\r\n options: {\r\n toolbarGroups: [\r\n {name: 'document', groups: ['mode', 'document', 'doctools']},\r\n {name: 'editing', groups: ['find', 'selection', 'spellchecker', 'editing']},\r\n {name: 'forms', groups: ['forms']},\r\n {name: 'basicstyles', groups: ['basicstyles', 'cleanup']},\r\n {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi', 'paragraph']},\r\n {name: 'links', groups: ['links']},\r\n {name: 'insert', groups: ['insert']},\r\n '/',\r\n {name: 'clipboard', groups: ['clipboard', 'undo']},\r\n {name: 'styles', groups: ['styles']},\r\n {name: 'colors', groups: ['colors']},\r\n {name: 'tools', groups: ['tools']},\r\n {name: 'others', groups: ['others']},\r\n ],\r\n title: false,\r\n allowedContent: true, // DISABLES Advanced Content Filter. This is so templates with classes: allowed through\r\n bodyId: 'editor',\r\n templates_replaceContent: false,\r\n enterMode: 'P',\r\n forceEnterMode: true,\r\n format_tags: 'p;h1;h2;h3;h4;h5;h6',\r\n removePlugins: 'table,magicline,tabletools',\r\n removeButtons: 'Save,NewPage,Preview,Print,Templates,PasteText,PasteFromWord,Find,Replace,SelectAll,Scayt,Form,HiddenField,ImageButton,Button,Select,Textarea,TextField,Radio,Checkbox,Outdent,Indent,Blockquote,CreateDiv,Language,Table,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,Styles,BGColor,Maximize,About,ShowBlocks,BidiLtr,BidiRtl,Flash,Image,Subscript,Superscript,Anchor',\r\n minimumChangeMilliseconds: 100\r\n },\r\n\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"text\" component', component);\r\n\r\n var self = this;\r\n var options = keditor.options;\r\n\r\n var componentContent = component.children('.keditor-component-content');\r\n componentContent.prop('contenteditable', true);\r\n\r\n componentContent.on('input', function (e) {\r\n if (typeof options.onComponentChanged === 'function') {\r\n options.onComponentChanged.call(contentArea, e, component);\r\n }\r\n\r\n if (typeof options.onContainerChanged === 'function') {\r\n options.onContainerChanged.call(contentArea, e, container);\r\n }\r\n\r\n if (typeof options.onContentChanged === 'function') {\r\n options.onContentChanged.call(contentArea, e);\r\n }\r\n });\r\n\r\n var editor = componentContent.ckeditor(self.options).editor;\r\n editor.on('instanceReady', function () {\r\n flog('CKEditor is ready', component);\r\n\r\n if (typeof options.onComponentReady === 'function') {\r\n options.onComponentReady.call(contentArea, component, editor);\r\n }\r\n });\r\n },\r\n\r\n getContent: function (component, keditor) {\r\n flog('getContent \"text\" component', component);\r\n\r\n var componentContent = component.find('.keditor-component-content');\r\n var id = componentContent.attr('id');\r\n var editor = CKEDITOR.instances[id];\r\n if (editor) {\r\n return editor.getData();\r\n } else {\r\n return componentContent.html();\r\n }\r\n },\r\n\r\n destroy: function (component, keditor) {\r\n flog('destroy \"text\" component', component);\r\n\r\n var id = component.find('.keditor-component-content').attr('id');\r\n var editor = CKEDITOR.instances[id];\r\n if (editor) {\r\n editor.destroy();\r\n }\r\n }\r\n };\r\n\r\n})(jQuery);\r\n"]}