{"version":3,"sources":["keditor-components.js"],"names":["$","KEditor","keditor","flog","log","components","getContent","component","componentContent","children","audio","find","unwrap","html","settingEnabled","settingTitle","initSettingForm","form","append","showSettingForm","options","fileInput","btnAudioFileInput","off","on","e","preventDefault","trigger","file","this","files","test","type","attr","URL","createObjectURL","load","showSettingPanel","alert","autoplayToggle","checked","removeAttr","showcontrolsToggle","audioWidth","css","value","jQuery","initFormBuilder","self","formBuilderArea","formData","formContent","prepend","btnEditForm","btnPreviewForm","formBuilder","disableInjectedStyle","showActionButtons","dataType","disableFields","disabledAttrs","typeUserDisabledAttrs","checkbox-group","hasClass","show","hide","addClass","removeClass","renderForm","data","formRender","actions","getData","each","div","dataGrid","split","wrap","label","input","subDiv","length","init","contentArea","container","remove","getSettingComponent","layout","val","iframe","wrapper","parent","initIframeCover","btnEdit","inputData","prompt","src","btn169","btn43","img","photoEdit","next","reader","FileReader","addEventListener","target","result","width","height","readAsDataURL","inputAlign","panel","inputResponsive","cbbStyle","inputWidth","inputHeight","newWidth","newHeight","Math","round","ratio","algin","prop","CKEDITOR","disableAutoInline","toolbarGroups","name","groups","title","allowedContent","bodyId","templates_replaceContent","enterMode","forceEnterMode","format_tags","removePlugins","removeButtons","minimumChangeMilliseconds","onComponentChanged","call","onContainerChanged","onContentChanged","editor","ckeditor","onComponentReady","id","instances","destroy","video","is","btnVideoFileInput","removeProp","loopToggle","currentWidth","replace","currentRatio","videoWidth","vimeoRegex","match","chkAutoplay","embedItem","currentUrl","newUrl","indexOf","youtubeRegex"],"mappings":"CAAA,SAAWA,GACP,GAAIC,GAAUD,EAAEE,QACZC,EAAOF,EAAQG,GAEnBH,GAAQI,WAAkB,OACtBC,WAAY,SAAUC,EAAWL,GAC7BC,EAAK,0CAEL,IAAIK,GAAmBD,EAAUE,SAAS,8BACtCC,EAAQF,EAAiBG,KAAK,QAGlC,OAFAD,GAAME,SAECJ,EAAiBK,QAG5BC,gBAAgB,EAEhBC,aAAc,iBAEdC,gBAAiB,SAAUC,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AM,GACf5J,EAAQoF,sBAAsB3E,KAAK,0BAA0BsB,KAAK,MAAO,iCAAmC6H,EAAM,IAElHxH,MAAM,iCAId,IAAI2D,GAAShF,EAAKN,KAAK,mBACvBsF,GAAOzE,GAAG,QAAS,SAAUC,GACzBA,EAAEC,iBAEFxB,EAAQoF,sBAAsB3E,KAAK,qBAAqBwD,YAAY,yBAAyBD,SAAS,2BAG1G,IAAIgC,GAAQjF,EAAKN,KAAK,kBACtBuF,GAAM1E,GAAG,QAAS,SAAUC,GACxBA,EAAEC,iBAEFxB,EAAQoF,sBAAsB3E,KAAK,qBAAqBwD,YAAY,0BAA0BD,SAAS,0BAG3G,IAAI6F,GAAc9I,EAAKN,KAAK,oBAC5BoJ,GAAYvI,GAAG,QAAS,WACpB,GAAIwI,GAAY9J,EAAQoF,sBAAsB3E,KAAK,0BAC/CsJ,EAAaD,EAAU/H,KAAK,OAC5BiI,EAAUD,EAAWP,QAAQ,UAAW,IAAO,cAAgBK,EAAYV,GAAG,YAAc,EAAI,EAEpGlJ,GAAK,gBAAkB8J,EAAY,YAAcC,GACjDF,EAAU/H,KAAK,MAAOiI,MAI9B/I,gBAAiB,SAAUF,EAAMV,EAAWL,GACxCC,EAAK,sCAAuCI,EAE5C,IAAIyJ,GAAYzJ,EAAUI,KAAK,0BAC3BoJ,EAAc9I,EAAKN,KAAK,qBACxBqF,EAAMgE,EAAU/H,KAAK,MAEzB8H,GAAYrC,KAAK,UAAW1B,EAAImE,QAAQ,uBAIjDrH","file":"keditor-components.min.js","sourcesContent":["(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n \r\n KEditor.components['audio'] = {\r\n getContent: function (component, keditor) {\r\n flog('getContent \"audio\" component, component');\r\n \r\n var componentContent = component.children('.keditor-component-content');\r\n var audio = componentContent.find('audio');\r\n audio.unwrap();\r\n \r\n return componentContent.html();\r\n },\r\n \r\n settingEnabled: true,\r\n \r\n settingTitle: 'Audio Settings',\r\n \r\n initSettingForm: function (form, keditor) {\r\n flog('init \"audio\" settings', form);\r\n \r\n form.append(\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n },\r\n \r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"audio\" component', form, component);\r\n \r\n var options = keditor.options;\r\n \r\n var audio = component.find('audio');\r\n var fileInput = form.find('#audioFileInput');\r\n var btnAudioFileInput = form.find('.btn-audioFileInput');\r\n btnAudioFileInput.off('click').on('click', function (e) {\r\n e.preventDefault();\r\n \r\n fileInput.trigger('click');\r\n });\r\n fileInput.off('change').on('change', function () {\r\n var file = this.files[0];\r\n if (/audio/.test(file.type)) {\r\n // Todo: Upload to your server :)\r\n \r\n audio.attr('src', URL.createObjectURL(file));\r\n \r\n audio.load(function () {\r\n keditor.showSettingPanel(component, options);\r\n });\r\n } else {\r\n alert('Your selected file is not an audio file!');\r\n }\r\n });\r\n \r\n var autoplayToggle = form.find('#audio-autoplay');\r\n autoplayToggle.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n audio.attr('autoplay', 'autoplay');\r\n } else {\r\n audio.removeAttr('autoplay');\r\n }\r\n });\r\n \r\n var showcontrolsToggle = form.find('#audio-showcontrols');\r\n showcontrolsToggle.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n audio.attr('controls', 'controls');\r\n } else {\r\n audio.removeAttr('controls');\r\n }\r\n });\r\n \r\n var audioWidth = form.find('#audio-width');\r\n audioWidth.off('change').on('change', function () {\r\n audio.css('width', this.value + '%');\r\n });\r\n }\r\n };\r\n})(jQuery);\r\n\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n \r\n KEditor.components['form'] = {\r\n initFormBuilder: function (component) {\r\n var self = this;\r\n \r\n var formBuilderArea = component.find('.form-builder-area');\r\n var formData = component.find('.form-data');\r\n var formContent = component.find('.form-content');\r\n \r\n component.find('.keditor-component-content').prepend(\r\n '

' +\r\n ' Preview form ' +\r\n ' Edit form' +\r\n '

'\r\n );\r\n \r\n var btnEditForm = component.find('.btn-edit-form');\r\n var btnPreviewForm = component.find('.btn-preview-form');\r\n \r\n formBuilderArea.formBuilder({\r\n disableInjectedStyle: true,\r\n showActionButtons: false,\r\n dataType: 'json',\r\n formData: formData.html(),\r\n disableFields: [\r\n 'autocomplete',\r\n 'paragraph',\r\n 'header'\r\n ],\r\n disabledAttrs: ['access'],\r\n \r\n typeUserDisabledAttrs: {\r\n 'checkbox-group': [\r\n 'toggle',\r\n 'inline'\r\n ]\r\n }\r\n });\r\n \r\n btnEditForm.on('click', function (e) {\r\n e.preventDefault();\r\n \r\n if (!btnEditForm.hasClass('disabled')) {\r\n formBuilderArea.show();\r\n formContent.hide();\r\n btnEditForm.addClass('disabled');\r\n btnPreviewForm.removeClass('disabled');\r\n }\r\n });\r\n \r\n btnPreviewForm.on('click', function (e) {\r\n e.preventDefault();\r\n \r\n if (!btnPreviewForm.hasClass('disabled')) {\r\n self.renderForm(component);\r\n \r\n formBuilderArea.hide();\r\n formContent.show();\r\n btnEditForm.removeClass('disabled');\r\n btnPreviewForm.addClass('disabled');\r\n }\r\n });\r\n },\r\n \r\n renderForm: function (component, formBuilder) {\r\n var formContent = component.find('.form-content');\r\n \r\n if (!formBuilder) {\r\n var formBuilderArea = component.find('.form-builder-area');\r\n formBuilder = formBuilderArea.data('formBuilder');\r\n }\r\n \r\n formContent.formRender({\r\n dataType: 'json',\r\n formData: formBuilder.actions.getData('json')\r\n });\r\n \r\n if (formContent.hasClass('form-horizontal')) {\r\n formContent.children('div').each(function () {\r\n var div = $(this);\r\n var dataGrid = formContent.attr('data-grid') || '4-8';\r\n dataGrid = dataGrid.split('-');\r\n \r\n if (div.attr('class')) {\r\n if (div.hasClass('fb-button')) {\r\n div.find('button').wrap('
');\r\n } else {\r\n var label = div.children('label');\r\n var input = div.children('input, select, textarea');\r\n var subDiv = div.children('div');\r\n \r\n label.addClass('control-label col-sm-' + dataGrid[0]);\r\n \r\n if (subDiv.length > 0) {\r\n subDiv.addClass('col-sm-' + dataGrid[1]);\r\n } else {\r\n input.addClass('form-control').wrap('
');\r\n }\r\n }\r\n }\r\n });\r\n }\r\n },\r\n \r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"form\" component', component);\r\n \r\n var componentContent = component.find('.keditor-component-content');\r\n var formBuilder = component.find('.form-builder-area');\r\n var formContent = component.find('.form-content');\r\n var formData = component.find('.form-data');\r\n \r\n if (formData.length === 0) {\r\n componentContent.append('
')\r\n }\r\n \r\n if (formContent.length === 0) {\r\n componentContent.append('
')\r\n } else {\r\n formContent.hide()\r\n }\r\n \r\n if (formBuilder.length === 0) {\r\n formBuilder = $('
');\r\n componentContent.append(formBuilder);\r\n }\r\n \r\n this.initFormBuilder(component);\r\n },\r\n \r\n getContent: function (component, keditor) {\r\n flog('getContent \"form\" component', component);\r\n \r\n var self = this;\r\n var componentContent = component.find('.keditor-component-content');\r\n var formData = component.find('.form-data');\r\n var formBuilderArea = $('#' + component.attr('id')).find('.form-builder-area');\r\n var formBuilder = formBuilderArea.data('formBuilder');\r\n \r\n self.renderForm(component, formBuilder);\r\n formData.html(formBuilder.actions.getData('json'));\r\n component.find('.form-builder-area, .form-builder-tools').remove();\r\n component.find('.form-content').show();\r\n \r\n return componentContent.html();\r\n },\r\n \r\n settingEnabled: true,\r\n \r\n settingTitle: 'Form Settings',\r\n \r\n initSettingForm: function (form, keditor) {\r\n flog('initSettingForm \"form\" component');\r\n \r\n var self = this;\r\n \r\n form.html(\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n ' This setting is for width of label and control with number of cols as unit' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n \r\n \r\n form.find('.txt-form-action').on('change', function () {\r\n var component = keditor.getSettingComponent();\r\n var formContent = component.find('.form-content');\r\n \r\n formContent.attr('action', this.value);\r\n });\r\n \r\n form.find('.select-method').on('change', function () {\r\n var component = keditor.getSettingComponent();\r\n var formContent = component.find('.form-content');\r\n \r\n formContent.attr('action', this.value);\r\n });\r\n \r\n form.find('.select-enctype').on('change', function () {\r\n var component = keditor.getSettingComponent();\r\n var formContent = component.find('.form-content');\r\n \r\n formContent.attr('enctype', this.value);\r\n });\r\n \r\n form.find('.select-layout').on('change', function () {\r\n var component = keditor.getSettingComponent();\r\n var formContent = component.find('.form-content');\r\n \r\n formContent.removeClass('form-inline form-horizontal');\r\n if (this.value) {\r\n formContent.addClass(this.value);\r\n }\r\n self.renderForm(component);\r\n form.find('.select-grid-wrapper').css('display', this.value === 'form-horizontal' ? 'block' : 'none');\r\n });\r\n \r\n form.find('.select-grid').on('change', function () {\r\n var component = keditor.getSettingComponent();\r\n var formContent = component.find('.form-content');\r\n \r\n formContent.attr('data-grid', this.value);\r\n self.renderForm(component);\r\n });\r\n },\r\n \r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"form\" component', component);\r\n var formContent = component.find('.form-content');\r\n \r\n var layout = '';\r\n if (formContent.hasClass('form-inline')) {\r\n layout = 'form-inline';\r\n } else if (formContent.hasClass('form-horizontal')) {\r\n layout = 'form-horizontal';\r\n }\r\n \r\n form.find('.txt-form-action').val(formContent.attr('action') || '');\r\n form.find('.select-method').val(formContent.attr('method') || 'get');\r\n form.find('.select-enctype').val(formContent.attr('enctype'));\r\n form.find('.select-layout').val(layout);\r\n form.find('.select-grid-wrapper').css('display', layout === 'form-horizontal' ? 'block' : 'none');\r\n form.find('.select-grid').val(formContent.attr('data-grid') || '4-8');\r\n }\r\n };\r\n \r\n})(jQuery);\r\n\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n\r\n KEditor.components['googlemap'] = {\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"googlemap\" component', component);\r\n\r\n var iframe = component.find('iframe');\r\n var wrapper = iframe.parent();\r\n keditor.initIframeCover(iframe, wrapper);\r\n },\r\n\r\n settingEnabled: true,\r\n\r\n settingTitle: 'Google Map Settings',\r\n\r\n initSettingForm: function (form, keditor) {\r\n flog('initSettingForm \"googlemap\" component');\r\n\r\n form.append(\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n\r\n var btnEdit = form.find('.btn-googlemap-edit');\r\n btnEdit.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n var inputData = prompt('Please enter Google Map embed code in here:');\r\n var iframe = $(inputData);\r\n var src = iframe.attr('src');\r\n if (iframe.length > 0 && src && src.length > 0) {\r\n keditor.getSettingComponent().find('.embed-responsive-item').attr('src', src);\r\n } else {\r\n alert('Your Google Map embed code is invalid!');\r\n }\r\n });\r\n\r\n var btn169 = form.find('.btn-googlemap-169');\r\n btn169.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-4by3').addClass('embed-responsive-16by9');\r\n });\r\n\r\n var btn43 = form.find('.btn-googlemap-43');\r\n btn43.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-16by9').addClass('embed-responsive-4by3');\r\n });\r\n }\r\n };\r\n\r\n})(jQuery);\r\n\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n \r\n KEditor.components['photo'] = {\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"photo\" component', component);\r\n \r\n var componentContent = component.children('.keditor-component-content');\r\n var img = componentContent.find('img');\r\n \r\n img.css('display', 'inline-block');\r\n },\r\n \r\n settingEnabled: true,\r\n \r\n settingTitle: 'Photo Settings',\r\n \r\n initSettingForm: function (form, keditor) {\r\n flog('initSettingForm \"photo\" component');\r\n \r\n var self = this;\r\n var options = keditor.options;\r\n \r\n form.append(\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n \r\n var photoEdit = form.find('#photo-edit');\r\n var fileInput = photoEdit.next();\r\n photoEdit.on('click', function (e) {\r\n e.preventDefault();\r\n \r\n fileInput.trigger('click');\r\n });\r\n fileInput.on('change', function () {\r\n var file = this.files[0];\r\n if (/image/.test(file.type)) {\r\n var reader = new FileReader();\r\n \r\n reader.addEventListener('load', function (e) {\r\n var img = keditor.getSettingComponent().find('img');\r\n img.attr('src', e.target.result);\r\n img.css({\r\n width: '',\r\n height: ''\r\n });\r\n img.load(function () {\r\n keditor.showSettingPanel(keditor.getSettingComponent(), options);\r\n });\r\n });\r\n \r\n reader.readAsDataURL(this.files[0]);\r\n } else {\r\n alert('Your selected file is not photo!');\r\n }\r\n });\r\n \r\n var inputAlign = form.find('#photo-align');\r\n inputAlign.on('change', function () {\r\n var panel = keditor.getSettingComponent().find('.photo-panel');\r\n panel.css('text-align', this.value);\r\n });\r\n \r\n var inputResponsive = form.find('#photo-responsive');\r\n inputResponsive.on('click', function () {\r\n keditor.getSettingComponent().find('img')[this.checked ? 'addClass' : 'removeClass']('img-responsive');\r\n });\r\n \r\n var cbbStyle = form.find('#photo-style');\r\n cbbStyle.on('change', function () {\r\n var img = keditor.getSettingComponent().find('img');\r\n var val = this.value;\r\n \r\n img.removeClass('img-rounded img-circle img-thumbnail');\r\n if (val) {\r\n img.addClass(val);\r\n }\r\n });\r\n \r\n var inputWidth = form.find('#photo-width');\r\n var inputHeight = form.find('#photo-height');\r\n inputWidth.on('change', function () {\r\n var img = keditor.getSettingComponent().find('img');\r\n var newWidth = +this.value;\r\n var newHeight = Math.round(newWidth / self.ratio);\r\n \r\n if (newWidth <= 0) {\r\n newWidth = self.width;\r\n newHeight = self.height;\r\n this.value = newWidth;\r\n }\r\n \r\n img.css({\r\n 'width': newWidth,\r\n 'height': newHeight\r\n });\r\n inputHeight.val(newHeight);\r\n });\r\n inputHeight.on('change', function () {\r\n var img = keditor.getSettingComponent().find('img');\r\n var newHeight = +this.value;\r\n var newWidth = Math.round(newHeight * self.ratio);\r\n \r\n if (newHeight <= 0) {\r\n newWidth = self.width;\r\n newHeight = self.height;\r\n this.value = newHeight;\r\n }\r\n \r\n img.css({\r\n 'height': newHeight,\r\n 'width': newWidth\r\n });\r\n inputWidth.val(newWidth);\r\n });\r\n },\r\n \r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"photo\" component', component);\r\n \r\n var self = this;\r\n var inputAlign = form.find('#photo-align');\r\n var inputResponsive = form.find('#photo-responsive');\r\n var inputWidth = form.find('#photo-width');\r\n var inputHeight = form.find('#photo-height');\r\n var cbbStyle = form.find('#photo-style');\r\n \r\n var panel = component.find('.photo-panel');\r\n var img = panel.find('img');\r\n \r\n var algin = panel.css('text-align');\r\n if (algin !== 'right' || algin !== 'center') {\r\n algin = 'left';\r\n }\r\n \r\n if (img.hasClass('img-rounded')) {\r\n cbbStyle.val('img-rounded');\r\n } else if (img.hasClass('img-circle')) {\r\n cbbStyle.val('img-circle');\r\n } else if (img.hasClass('img-thumbnail')) {\r\n cbbStyle.val('img-thumbnail');\r\n } else {\r\n cbbStyle.val('');\r\n }\r\n \r\n inputAlign.val(algin);\r\n inputResponsive.prop('checked', img.hasClass('img-responsive'));\r\n inputWidth.val(img.width());\r\n inputHeight.val(img.height());\r\n \r\n $('').attr('src', img.attr('src')).load(function () {\r\n self.ratio = this.width / this.height;\r\n self.width = this.width;\r\n self.height = this.height;\r\n });\r\n }\r\n };\r\n \r\n})(jQuery);\r\n\r\n(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\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n\r\n KEditor.components['video'] = {\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"video\" component', component);\r\n\r\n var componentContent = component.children('.keditor-component-content');\r\n var video = componentContent.find('video');\r\n\r\n if (!video.parent().is('.video-wrapper')) {\r\n video.wrap('
');\r\n }\r\n },\r\n\r\n getContent: function (component, keditor) {\r\n flog('getContent \"video\" component', component);\r\n\r\n var componentContent = component.children('.keditor-component-content');\r\n var video = componentContent.find('video');\r\n video.unwrap();\r\n\r\n return componentContent.html();\r\n },\r\n\r\n settingEnabled: true,\r\n\r\n settingTitle: 'Video Settings',\r\n\r\n initSettingForm: function (form, keditor) {\r\n flog('init \"video\" settings', form);\r\n\r\n form.append(\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' 4:3' +\r\n '
' +\r\n '
' +\r\n ' 16:9' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n },\r\n\r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"video\" settings', form, component);\r\n\r\n var options = keditor.options;\r\n var video = component.find('video');\r\n var fileInput = form.find('#videoFileInput');\r\n var btnVideoFileInput = form.find('.btn-videoFileInput');\r\n btnVideoFileInput.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n fileInput.trigger('click');\r\n });\r\n fileInput.off('change').on('change', function () {\r\n var file = this.files[0];\r\n if (/video/.test(file.type)) {\r\n // Todo: Upload to your server :)\r\n\r\n video.attr('src', URL.createObjectURL(file));\r\n\r\n video.load(function () {\r\n keditor.showSettingPanel(component, options);\r\n });\r\n } else {\r\n alert('Your selected file is not an video file!');\r\n }\r\n });\r\n\r\n var autoplayToggle = form.find('#video-autoplay');\r\n autoplayToggle.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n video.prop('autoplay', true);\r\n } else {\r\n video.removeProp('autoplay');\r\n }\r\n });\r\n\r\n var loopToggle = form.find('#video-loop');\r\n loopToggle.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n video.prop('loop', true);\r\n } else {\r\n video.removeProp('loop');\r\n }\r\n });\r\n\r\n var ratio = form.find('.video-ratio');\r\n ratio.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n var currentWidth = video.css('width') || video.prop('width');\r\n currentWidth = currentWidth.replace('px', '');\r\n\r\n var currentRatio = this.value === '16/9' ? 16 / 9 : 4 / 3;\r\n var height = currentWidth / currentRatio;\r\n video.css('width', currentWidth + 'px');\r\n video.css('height', height + 'px');\r\n video.removeProp('width');\r\n video.removeProp('height');\r\n }\r\n });\r\n\r\n var showcontrolsToggle = form.find('#video-showcontrols');\r\n showcontrolsToggle.off('click').on('click', function (e) {\r\n if (this.checked) {\r\n video.attr('controls', 'controls');\r\n } else {\r\n video.removeAttr('controls');\r\n }\r\n });\r\n\r\n var videoWidth = form.find('#video-width');\r\n videoWidth.off('change').on('change', function () {\r\n video.css('width', this.value + 'px');\r\n var currentRatio = form.find('.video-ratio:checked').val() === '16/9' ? 16 / 9 : 4 / 3;\r\n var height = this.value / currentRatio;\r\n video.css('height', height + 'px');\r\n video.removeProp('width');\r\n video.removeProp('height');\r\n });\r\n }\r\n };\r\n})(jQuery);\r\n\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n\r\n KEditor.components['vimeo'] = {\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"vimeo\" component', component);\r\n\r\n var iframe = component.find('iframe');\r\n var wrapper = iframe.parent();\r\n keditor.initIframeCover(iframe, wrapper);\r\n },\r\n\r\n settingEnabled: true,\r\n\r\n settingTitle: 'Vimeo Settings',\r\n\r\n initSettingForm: function (form, keditor) {\r\n flog('initSettingForm \"vimeo\" component');\r\n\r\n form.append(\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n\r\n var btnEdit = form.find('.btn-vimeo-edit');\r\n btnEdit.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n var inputData = prompt('Please enter Vimeo URL in here:');\r\n var vimeoRegex = /https?:\\/\\/(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/([^\\/]*)\\/videos\\/|album\\/(\\d+)\\/video\\/|video\\/|)(\\d+)(?:$|\\/|\\?)/;\r\n var match = inputData.match(vimeoRegex);\r\n if (match && match[1]) {\r\n keditor.getSettingComponent().find('.embed-responsive-item').attr('src', 'https://player.vimeo.com/video/' + match[1] + '?byline=0&portrait=0&badge=0');\r\n } else {\r\n alert('Your Vimeo URL is invalid!');\r\n }\r\n });\r\n\r\n var btn169 = form.find('.btn-vimeo-169');\r\n btn169.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-4by3').addClass('embed-responsive-16by9');\r\n });\r\n\r\n var btn43 = form.find('.btn-vimeo-43');\r\n btn43.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-16by9').addClass('embed-responsive-4by3');\r\n });\r\n\r\n var chkAutoplay = form.find('#vimeo-autoplay');\r\n chkAutoplay.on('click', function () {\r\n var embedItem = keditor.getSettingComponent().find('.embed-responsive-item');\r\n var currentUrl = embedItem.attr('src');\r\n var newUrl = (currentUrl.replace(/(\\?.+)+/, '')) + '?byline=0&portrait=0&badge=0&autoplay=' + (chkAutoplay.is(':checked') ? 1 : 0);\r\n\r\n flog('Current url: ' + currentUrl, 'New url: ' + newUrl);\r\n embedItem.attr('src', newUrl);\r\n });\r\n },\r\n\r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"vimeo\" component', component);\r\n\r\n var embedItem = component.find('.embed-responsive-item');\r\n var chkAutoplay = form.find('#vimeo-autoplay');\r\n var src = embedItem.attr('src');\r\n\r\n chkAutoplay.prop('checked', src.indexOf('autoplay=1') !== -1);\r\n }\r\n };\r\n\r\n})(jQuery);\r\n\r\n(function ($) {\r\n var KEditor = $.keditor;\r\n var flog = KEditor.log;\r\n\r\n KEditor.components['youtube'] = {\r\n init: function (contentArea, container, component, keditor) {\r\n flog('init \"youtube\" component', component);\r\n\r\n var iframe = component.find('iframe');\r\n var wrapper = iframe.parent();\r\n keditor.initIframeCover(iframe, wrapper);\r\n },\r\n\r\n settingEnabled: true,\r\n\r\n settingTitle: 'Youtube Settings',\r\n\r\n initSettingForm: function (form, keditor) {\r\n flog('initSettingForm \"youtube\" component');\r\n\r\n form.append(\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n '
'\r\n );\r\n\r\n var btnEdit = form.find('.btn-youtube-edit');\r\n btnEdit.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n var inputData = prompt('Please enter Youtube URL in here:');\r\n var youtubeRegex = /^(?:http(?:s)?:\\/\\/)?(?:www\\.)?(?:m\\.)?(?:youtu\\.be\\/|youtube\\.com\\/(?:(?:watch)?\\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\\/))([^\\?&\\\"'>]+)/;\r\n var match = inputData.match(youtubeRegex);\r\n if (match && match[1]) {\r\n keditor.getSettingComponent().find('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' + match[1]);\r\n } else {\r\n alert('Your Youtube URL is invalid!');\r\n }\r\n });\r\n\r\n var btn169 = form.find('.btn-youtube-169');\r\n btn169.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-4by3').addClass('embed-responsive-16by9');\r\n });\r\n\r\n var btn43 = form.find('.btn-youtube-43');\r\n btn43.on('click', function (e) {\r\n e.preventDefault();\r\n\r\n keditor.getSettingComponent().find('.embed-responsive').removeClass('embed-responsive-16by9').addClass('embed-responsive-4by3');\r\n });\r\n\r\n var chkAutoplay = form.find('#youtube-autoplay');\r\n chkAutoplay.on('click', function () {\r\n var embedItem = keditor.getSettingComponent().find('.embed-responsive-item');\r\n var currentUrl = embedItem.attr('src');\r\n var newUrl = (currentUrl.replace(/(\\?.+)+/, '')) + '?autoplay=' + (chkAutoplay.is(':checked') ? 1 : 0);\r\n\r\n flog('Current url: ' + currentUrl, 'New url: ' + newUrl);\r\n embedItem.attr('src', newUrl);\r\n });\r\n },\r\n\r\n showSettingForm: function (form, component, keditor) {\r\n flog('showSettingForm \"youtube\" component', component);\r\n\r\n var embedItem = component.find('.embed-responsive-item');\r\n var chkAutoplay = form.find('#youtube-autoplay');\r\n var src = embedItem.attr('src');\r\n\r\n chkAutoplay.prop('checked', src.indexOf('autoplay=1') !== -1);\r\n }\r\n };\r\n\r\n})(jQuery);\r\n"]}