|
|
|
|
@ -11,31 +11,31 @@ editor.$win.trigger('scroll');}
|
|
|
|
|
function toggle(){if(!isActive()){_on();}
|
|
|
|
|
else{_off();}
|
|
|
|
|
refresh(editor.$tb.find('.fr-command[data-cmd="fullscreen"]'));$(window).trigger('oc.updateUi')}
|
|
|
|
|
function refresh($btn){var active=isActive();$btn.toggleClass('fr-active',active);$btn.find('i').toggleClass('fa-expand',!active).toggleClass('fa-compress',active);}
|
|
|
|
|
function refresh($btn){var active=isActive();$btn.toggleClass('fr-active',active);$btn.find('> *').replaceWith(!active?editor.icon.create('fullscreen'):editor.icon.create('fullscreenCompress'));}
|
|
|
|
|
function _init(){if(!editor.$wp)return false;editor.events.$on($(editor.o_win),'resize',function(){if(isActive()){_off();_on();}});editor.events.on('toolbar.hide',function(){if(isActive()&&editor.helpers.isMobile())return false;})}
|
|
|
|
|
return{_init:_init,toggle:toggle,refresh:refresh,isActive:isActive}}
|
|
|
|
|
$.FE.RegisterCommand('fullscreen',{title:'Fullscreen',undo:false,focus:false,forcedRefresh:true,callback:function(){this.fullscreen.toggle();},refresh:function($btn){this.fullscreen.refresh($btn);},plugin:'fullscreen'})
|
|
|
|
|
$.FE.DefineIcon('fullscreen',{NAME:'expand'});}));(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');}
|
|
|
|
|
$.FE.DefineIcon('fullscreen',{NAME:'expand'});$.FE.DefineIcon('fullscreenCompress',{NAME:'compress'});}));(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=='undefined'){jQuery=require('jquery');}
|
|
|
|
|
else{jQuery=require('jquery')(root);}}
|
|
|
|
|
factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function($){'use strict';$.extend($.FE.DEFAULTS,{aceEditor:true,aceEditorOptions:{showLineNumbers:true,useSoftTabs:false,wrap:true,mode:'ace/mode/html',tabSize:2},codeBeautifierOptions:{end_with_newline:true,indent_inner_html:true,extra_liners:['p','h1','h2','h3','h4','h5','h6','blockquote','pre','ul','ol','table','dl'],brace_style:'expand',indent_char:'\t',indent_size:1,wrap_line_length:0}})
|
|
|
|
|
$.FE.PLUGINS.codeView=function(editor){var $html_area;var ace_editor;function isActive(){return editor.$box.hasClass('fr-code-view');}
|
|
|
|
|
function get(){if(ace_editor){return ace_editor.getValue();}else{return $html_area.val();}}
|
|
|
|
|
function _showText($btn){var html=get();editor.html.set(html);editor.$el.blur();editor.$tb.find(' > .fr-command').not($btn).removeClass('fr-disabled');$btn.removeClass('fr-active');editor.events.focus(true);editor.placeholder.refresh();editor.undo.saveStep();}
|
|
|
|
|
function _showHTML($btn,height){if(!$html_area)_initArea();if(!ace_editor&&editor.opts.aceEditor&&typeof ace!='undefined'){ace_editor=ace.edit($html_area.get(0));ace_editor.setOptions(editor.opts.aceEditorOptions);}
|
|
|
|
|
editor.undo.saveStep();editor.html.cleanEmptyTags();editor.html.cleanWhiteTags(true);if(editor.core.hasFocus()){if(!editor.core.isEmpty()){editor.selection.save();editor.$el.find('.fr-marker[data-type="true"]:first').replaceWith('<span class="fr-tmp fr-sm">F</span>');editor.$el.find('.fr-marker[data-type="false"]:last').replaceWith('<span class="fr-tmp fr-em">F</span>');}
|
|
|
|
|
editor.$el.blur();}
|
|
|
|
|
var html=editor.html.get(false,true);editor.$el.find('span.fr-tmp').remove();html=html.replace(/<span class="fr-tmp fr-sm">F<\/span>/,'FROALA-SM');html=html.replace(/<span class="fr-tmp fr-em">F<\/span>/,'FROALA-EM');if(editor.codeBeautifier){html=editor.codeBeautifier.run(html,editor.opts.codeBeautifierOptions);}
|
|
|
|
|
function _showHTML($btn){if(!$html_area)_initArea();if(!ace_editor&&editor.opts.aceEditor&&typeof ace!='undefined'){ace_editor=ace.edit($html_area.get(0));ace_editor.setOptions(editor.opts.aceEditorOptions);}
|
|
|
|
|
editor.undo.saveStep();editor.html.cleanEmptyTags();editor.html.cleanWhiteTags(true);if(editor.core.hasFocus()){if(!editor.core.isEmpty()){editor.selection.save();editor.$el.find('.fr-marker[data-type="true"]:first').replaceWith('<span class="fr-tmp fr-sm">F</span>');editor.$el.find('.fr-marker[data-type="false"]:last').replaceWith('<span class="fr-tmp fr-em">F</span>');}}
|
|
|
|
|
var html=editor.html.get(false,true);editor.$el.find('span.fr-tmp').remove();if(editor.core.hasFocus())editor.$el.blur();html=html.replace(/<span class="fr-tmp fr-sm">F<\/span>/,'FROALA-SM');html=html.replace(/<span class="fr-tmp fr-em">F<\/span>/,'FROALA-EM');if(editor.codeBeautifier){html=editor.codeBeautifier.run(html,editor.opts.codeBeautifierOptions);}
|
|
|
|
|
var s_index;var e_index;if(ace_editor){s_index=html.indexOf('FROALA-SM');e_index=html.indexOf('FROALA-EM');if(s_index>e_index){s_index=e_index;}
|
|
|
|
|
else{e_index=e_index-9;}
|
|
|
|
|
html=html.replace(/FROALA-SM/g,'').replace(/FROALA-EM/g,'')
|
|
|
|
|
var s_line=html.substring(0,s_index).length-html.substring(0,s_index).replace(/\n/g,'').length;var e_line=html.substring(0,e_index).length-html.substring(0,e_index).replace(/\n/g,'').length;s_index=html.substring(0,s_index).length-html.substring(0,html.substring(0,s_index).lastIndexOf('\n')+1).length;e_index=html.substring(0,e_index).length-html.substring(0,html.substring(0,e_index).lastIndexOf('\n')+1).length;ace_editor.$blockScrolling=Infinity
|
|
|
|
|
ace_editor.getSession().setValue(html);ace_editor.focus();ace_editor.selection.moveCursorToPosition({row:s_line,column:s_index});ace_editor.selection.selectToPosition({row:e_line,column:e_index});ace_editor.resize();ace_editor.session.getUndoManager().reset();}
|
|
|
|
|
else{s_index=html.indexOf('FROALA-SM');e_index=html.indexOf('FROALA-EM')-9;$html_area.css('height',height);if(editor.opts.height||editor.opts.heightMax){$html_area.css('max-height',editor.opts.height||editor.opts.heightMax);}
|
|
|
|
|
else{s_index=html.indexOf('FROALA-SM');e_index=html.indexOf('FROALA-EM')-9;if(editor.opts.heightMin){$html_area.css('min-height',editor.opts.heightMin);}
|
|
|
|
|
if(editor.opts.height||editor.opts.heightMax){$html_area.css('max-height',editor.opts.height||editor.opts.heightMax);}
|
|
|
|
|
$html_area.val(html.replace(/FROALA-SM/g,'').replace(/FROALA-EM/g,''));$html_area.focus();$html_area.get(0).setSelectionRange(s_index,e_index);}
|
|
|
|
|
editor.$tb.find(' > .fr-command').not($btn).addClass('fr-disabled');$btn.addClass('fr-active');if(!editor.helpers.isMobile()&&editor.opts.toolbarInline){editor.toolbar.hide();}}
|
|
|
|
|
function toggle(val){if(typeof val=='undefined')val=!isActive();var $btn=editor.$tb.find('.fr-command[data-cmd="html"]');if(!val){editor.$box.toggleClass('fr-code-view',false);_showText($btn);}else{editor.popups.hideAll();var height=editor.$wp.outerHeight();editor.$box.toggleClass('fr-code-view',true);_showHTML($btn,height);}}
|
|
|
|
|
function _destroy(){if(isActive()){toggle(editor.$tb.find('button[data-cmd="html"]'));$html_area.val('').removeData().remove();}
|
|
|
|
|
if($back_button)$back_button.remove();}
|
|
|
|
|
function toggle(val){if(typeof val=='undefined')val=!isActive();var $btn=editor.$tb.find('.fr-command[data-cmd="html"]');if(!val){editor.$box.toggleClass('fr-code-view',false);_showText($btn);}else{editor.popups.hideAll();editor.$box.toggleClass('fr-code-view',true);_showHTML($btn);}}
|
|
|
|
|
function _destroy(){if(isActive()){toggle(editor.$tb.find('button[data-cmd="html"]'));}
|
|
|
|
|
$html_area.val('').removeData().remove();$html_area=null;if($back_button){$back_button.remove();$back_button=null;}}
|
|
|
|
|
function _initArea(){$html_area=$('<textarea class="fr-code" tabindex="-1">');editor.$wp.append($html_area);$html_area.attr('dir',editor.opts.direction);if(editor.opts.toolbarInline){$back_button=$('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'+(editor.helpers.isMobile()?'':' fr-desktop')+'" role="button" tabindex="-1"><i class="fa fa-code"></i></button>');editor.$box.append($back_button);editor.events.bindClick(editor.$box,'a.html-switch',function(){toggle(false);});}
|
|
|
|
|
var cancel=function(){return!isActive();}
|
|
|
|
|
editor.events.on('buttons.refresh',cancel);editor.events.on('copy',cancel,true);editor.events.on('cut',cancel,true);editor.events.on('paste',cancel,true);editor.events.on('destroy',_destroy,true);editor.events.on('html.set',function(){if(isActive())toggle(true);});editor.events.on('form.submit',function(){if(isActive()){editor.html.set(get());editor.events.trigger('contentChanged',[],true);}},true);}
|
|
|
|
|
@ -45,11 +45,11 @@ $.FE.DefineIcon('html',{NAME:'code'});}));!function(a){"function"==typeof define
|
|
|
|
|
else{jQuery=require('jquery')(root);}}
|
|
|
|
|
factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function($){'use strict';$.extend($.FE.POPUP_TEMPLATES,{'file.insert':'[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]'})
|
|
|
|
|
$.extend($.FE.DEFAULTS,{fileUploadURL:'http://i.froala.com/upload',fileUploadParam:'file',fileUploadParams:{},fileUploadToS3:false,fileUploadMethod:'POST',fileMaxSize:10*1024*1024,fileAllowedTypes:['*'],fileInsertButtons:['fileBack','|','fileUpload','fileByURL'],fileUseSelectedText:false});$.FE.PLUGINS.file=function(editor){var BAD_LINK=1;var MISSING_LINK=2;var ERROR_DURING_UPLOAD=3;var BAD_RESPONSE=4;var MAX_SIZE_EXCEEDED=5;var BAD_FILE_TYPE=6;var NO_CORS_IE=7;var error_messages={};error_messages[BAD_LINK]='File cannot be loaded from the passed link.';error_messages[MISSING_LINK]='No link in upload response.';error_messages[ERROR_DURING_UPLOAD]='Error during file upload.';error_messages[BAD_RESPONSE]='Parsing response failed.';error_messages[MAX_SIZE_EXCEEDED]='File is too large.';error_messages[BAD_FILE_TYPE]='File file type is invalid.';error_messages[NO_CORS_IE]='Files can be uploaded only to same domain in IE 8 and IE 9.';function showInsertPopup(){var $btn=editor.$tb.find('.fr-command[data-cmd="insertFile"]');var $popup=editor.popups.get('file.insert');if(!$popup)$popup=_initInsertPopup();hideProgressBar();if(!$popup.hasClass('fr-active')){editor.popups.refresh('file.insert');editor.popups.setContainer('file.insert',editor.$tb);var left=$btn.offset().left+$btn.outerWidth()/2;var top=$btn.offset().top+(editor.opts.toolbarBottom?10:$btn.outerHeight()-10);editor.popups.show('file.insert',left,top,$btn.outerHeight());}}
|
|
|
|
|
function showProgressBar(){var $popup=editor.popups.get('file.insert');if($popup){$popup.find('.fr-layer.fr-active').removeClass('fr-active').addClass('fr-pactive');$popup.find('.fr-file-progress-bar-layer').addClass('fr-active');$popup.find('.fr-buttons').hide();_setProgressMessage('Uploading',0);}}
|
|
|
|
|
function showProgressBar(){var $popup=editor.popups.get('file.insert');if(!$popup)$popup=_initInsertPopup();$popup.find('.fr-layer.fr-active').removeClass('fr-active').addClass('fr-pactive');$popup.find('.fr-file-progress-bar-layer').addClass('fr-active');$popup.find('.fr-buttons').hide();_setProgressMessage('Uploading',0);}
|
|
|
|
|
function hideProgressBar(dismiss){var $popup=editor.popups.get('file.insert');if($popup){$popup.find('.fr-layer.fr-pactive').addClass('fr-active').removeClass('fr-pactive');$popup.find('.fr-file-progress-bar-layer').removeClass('fr-active');$popup.find('.fr-buttons').show();if(dismiss){editor.popups.show('file.insert',null,null);}}}
|
|
|
|
|
function _setProgressMessage(message,progress){var $popup=editor.popups.get('file.insert');if($popup){var $layer=$popup.find('.fr-file-progress-bar-layer');$layer.find('h3').text(message+(progress?' '+progress+'%':''));$layer.removeClass('fr-error');if(progress){$layer.find('div').removeClass('fr-indeterminate');$layer.find('div > span').css('width',progress+'%');}
|
|
|
|
|
else{$layer.find('div').addClass('fr-indeterminate');}}}
|
|
|
|
|
function _showErrorMessage(message){var $popup=editor.popups.get('file.insert');var $layer=$popup.find('.fr-file-progress-bar-layer');$layer.addClass('fr-error')
|
|
|
|
|
function _showErrorMessage(message){showProgressBar();var $popup=editor.popups.get('file.insert');var $layer=$popup.find('.fr-file-progress-bar-layer');$layer.addClass('fr-error')
|
|
|
|
|
$layer.find('h3').text(message);}
|
|
|
|
|
function insertByURL(){var $popup=editor.popups.get('file.insert');var $input=$popup.find('.fr-file-by-url-layer input');var url=$input.val()
|
|
|
|
|
if(url.length>0){var filename=url.substring(url.lastIndexOf('/')+1);insert(editor.helpers.sanitizeURL($input.val()),filename,[]);$input.val('');$input.blur();}}
|
|
|
|
|
@ -86,8 +86,7 @@ by_url_layer='<div class="fr-file-by-url-layer'+active+' fr-layer" id="fr-file-b
|
|
|
|
|
var progress_bar_layer='<div class="fr-file-progress-bar-layer fr-layer"><h3 class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command" data-cmd="fileDismissError" tabIndex="2">OK</button></div></div>';var template={buttons:file_buttons,upload_layer:upload_layer,by_url_layer:by_url_layer,progress_bar:progress_bar_layer};var $popup=editor.popups.create('file.insert',template);_bindInsertEvents($popup);return $popup;}
|
|
|
|
|
function _onRemove(link){if($(link).hasClass('fr-file')){return editor.events.trigger('file.unlink',[link]);}}
|
|
|
|
|
function _drop(e){var dt=e.originalEvent.dataTransfer;if(dt&&dt.files&&dt.files.length){var file=dt.files[0];if(file&&typeof file.type!='undefined'){if(file.type.indexOf('image')<0&&(editor.opts.fileAllowedTypes.indexOf(file.type)>=0||editor.opts.fileAllowedTypes.indexOf('*')>=0)){editor.markers.remove();editor.markers.insertAtPoint(e.originalEvent);editor.$el.find('.fr-marker').replaceWith($.FE.MARKERS);editor.popups.hideAll();var $popup=editor.popups.get('file.insert');if(!$popup)$popup=_initInsertPopup();editor.popups.setContainer('file.insert',$(editor.opts.scrollableContainer));editor.popups.show('file.insert',e.originalEvent.pageX,e.originalEvent.pageY);showProgressBar();upload(dt.files);e.preventDefault();e.stopPropagation();return false;}}}}
|
|
|
|
|
function _initEvents(){editor.events.on('drop',_drop);editor.events.$on(editor.$win,'keydown',function(e){var key_code=e.which;var $popup=editor.popups.get('file.insert')
|
|
|
|
|
if($popup&&key_code==$.FE.KEYCODE.ESC){$popup.trigger('abortUpload');}});}
|
|
|
|
|
function _initEvents(){editor.events.on('drop',_drop);editor.events.$on(editor.$win,'keydown',function(e){var key_code=e.which;var $popup=editor.popups.get('file.insert');if($popup&&key_code==$.FE.KEYCODE.ESC){$popup.trigger('abortUpload');}});editor.events.on('destroy',function(){var $popup=editor.popups.get('file.insert');if($popup){$popup.trigger('abortUpload');}});}
|
|
|
|
|
function back(){editor.events.disableBlur();editor.selection.restore();editor.events.enableBlur();editor.popups.hide('file.insert');editor.toolbar.showInline();}
|
|
|
|
|
function showLayer(name){var $popup=editor.popups.get('file.insert');var left;var top;if(!editor.opts.toolbarInline){var $btn=editor.$tb.find('.fr-command[data-cmd="insertFile"]');left=$btn.offset().left+$btn.outerWidth()/2;top=$btn.offset().top+(editor.opts.toolbarBottom?10:$btn.outerHeight()-10);}
|
|
|
|
|
else{top=$popup.offset().top-editor.helpers.getPX($popup.css('margin-top'));if($popup.hasClass('fr-above')){top+=$popup.outerHeight();}}
|
|
|
|
|
@ -242,7 +241,7 @@ $audio_obj.css('width',width+diff_x);$audio_obj.css('height',height+diff_y);$aud
|
|
|
|
|
function _handlerMouseup(e){if(!editor.core.sameInstance($audio_resizer))return true;if($handler&&$current_audio){if(e)e.stopPropagation();$handler=null;$overlay.hide();_repositionResizer();_showEditPopup();editor.undo.saveStep();}}
|
|
|
|
|
function _getHandler(pos){return'<div class="fr-handler fr-h'+pos+'"></div>';}
|
|
|
|
|
function _initResizer(){var doc;if(!editor.shared.$audio_resizer){editor.shared.$audio_resizer=$('<div class="fr-video-resizer"></div>');$audio_resizer=editor.shared.$audio_resizer;editor.events.$on($audio_resizer,'mousedown',function(e){e.stopPropagation();},true);if(editor.opts.audioResize){$audio_resizer.append(_getHandler('nw')+_getHandler('ne')+_getHandler('sw')+_getHandler('se'));editor.shared.$audio_overlay=$('<div class="fr-video-overlay"></div>');$overlay=editor.shared.$audio_overlay;doc=$audio_resizer.get(0).ownerDocument;$(doc).find('body').append($overlay);}}else{$audio_resizer=editor.shared.$audio_resizer;$overlay=editor.shared.$audio_overlay;editor.events.on('destroy',function(){$audio_resizer.removeClass('fr-active').appendTo($('body'));},true);}
|
|
|
|
|
editor.events.on('shared.destroy',function(){$audio_resizer.html('').removeData().remove();if(editor.opts.audioResize){$overlay.remove();}},true);if(!editor.helpers.isMobile()){editor.events.$on($(editor.o_win),'resize.audio',function(){_exitEdit(true);});}
|
|
|
|
|
editor.events.on('shared.destroy',function(){$audio_resizer.html('').removeData().remove();$audio_resizer=null;if(editor.opts.audioResize){$overlay.remove();$overlay=null;}},true);if(!editor.helpers.isMobile()){editor.events.$on($(editor.o_win),'resize.audio',function(){_exitEdit(true);});}
|
|
|
|
|
if(editor.opts.audioResize){doc=$audio_resizer.get(0).ownerDocument;editor.events.$on($audio_resizer,editor._mousedown,'.fr-handler',_handlerMousedown);editor.events.$on($(doc),editor._mousemove,_handlerMousemove);editor.events.$on($(doc.defaultView||doc.parentWindow),editor._mouseup,_handlerMouseup);editor.events.$on($overlay,'mouseleave',_handlerMouseup);}}
|
|
|
|
|
function _repositionResizer(){if(!$audio_resizer)_initResizer();(editor.$wp||$(editor.opts.scrollableContainer)).append($audio_resizer);$audio_resizer.data('instance',editor);var $audio_obj=$current_audio.find('iframe, embed, audio');$audio_resizer.css('top',(editor.opts.iframe?$audio_obj.offset().top-1:$audio_obj.offset().top-editor.$wp.offset().top-1)+editor.$wp.scrollTop()).css('left',(editor.opts.iframe?$audio_obj.offset().left-1:$audio_obj.offset().left-editor.$wp.offset().left-1)+editor.$wp.scrollLeft()).css('width',$audio_obj.outerWidth()).css('height',$audio_obj.height()).addClass('fr-active')}
|
|
|
|
|
var touchScroll;function _edit(e){if(e&&e.type=='touchend'&&touchScroll){return true;}
|
|
|
|
|
@ -256,7 +255,7 @@ editor.shared.audio_exit_flag=false;function _markExit(){editor.shared.audio_exi
|
|
|
|
|
function _unmarkExit(){editor.shared.audio_exit_flag=false;}
|
|
|
|
|
function _canExit(){return editor.shared.audio_exit_flag;}
|
|
|
|
|
function _initEvents(){editor.events.on('mousedown window.mousedown',_markExit);editor.events.on('window.touchmove',_unmarkExit);editor.events.on('mouseup window.mouseup',_exitEdit);editor.events.on('commands.mousedown',function($btn){if($btn.parents('.fr-toolbar').length>0){_exitEdit();}});editor.events.on('blur audio.hideResizer commands.undo commands.redo element.dropped',function(){_exitEdit(true);});}
|
|
|
|
|
function _initEditPopup(){var audio_buttons='';if(editor.opts.audioEditButtons.length>1){audio_buttons+='<div class="fr-buttons">';audio_buttons+=editor.button.buildList(editor.opts.audioEditButtons);audio_buttons+='</div>';}
|
|
|
|
|
function _initEditPopup(){var audio_buttons='';if(editor.opts.audioEditButtons.length>=1){audio_buttons+='<div class="fr-buttons">';audio_buttons+=editor.button.buildList(editor.opts.audioEditButtons);audio_buttons+='</div>';}
|
|
|
|
|
var template={buttons:audio_buttons}
|
|
|
|
|
var $popup=editor.popups.create('audio.edit',template);editor.events.$on(editor.$wp,'scroll.audio-edit',function(){if($current_audio&&editor.popups.isVisible('audio.edit')){_showEditPopup();}});return $popup;}
|
|
|
|
|
function _refreshSizePopup(){if($current_audio){var $popup=editor.popups.get('audio.size');var $audio_obj=$current_audio.find('iframe, embed, audio')
|
|
|
|
|
@ -372,7 +371,7 @@ editor.popups.hide('audio.insert')}
|
|
|
|
|
function _init(){editor.events.on('destroy',_destroy,true)
|
|
|
|
|
editor.events.on('video.linkError',_insertVideoFallback)
|
|
|
|
|
editor.events.on('audio.linkError',_insertAudioFallback)}
|
|
|
|
|
function _destroy(){editor.$el.off('keydown','figure',_onFigureKeydown)}
|
|
|
|
|
function _destroy(){}
|
|
|
|
|
return{_init:_init,insertFile:onInsertFile,insertImage:onInsertImage,insertVideo:onInsertVideo,insertAudio:onInsertAudio}}
|
|
|
|
|
if(!$.FE.PLUGINS.link||!$.FE.PLUGINS.file||!$.FE.PLUGINS.image||!$.FE.PLUGINS.video){throw new Error('Media manager plugin requires link, file, image and video plugin.');}
|
|
|
|
|
$.FE.DEFAULTS.imageInsertButtons.push('mmImageManager');$.FE.RegisterCommand('mmImageManager',{title:'Browse',undo:false,focus:false,callback:function(){this.mediaManager.insertImage();},plugin:'mediaManager'})
|
|
|
|
|
@ -480,6 +479,9 @@ froalaOptions.htmlDoNotWrapTags=['figure','script','style']
|
|
|
|
|
froalaOptions.lineBreakerTags=['figure','table','hr','iframe','form','dl']
|
|
|
|
|
froalaOptions.shortcutsEnabled=['show','bold','italic','underline','indent','outdent','undo','redo']
|
|
|
|
|
froalaOptions.linkInsertButtons=['linkBack','|']
|
|
|
|
|
froalaOptions.imageUploadURL=froalaOptions.fileUploadURL=window.location
|
|
|
|
|
froalaOptions.imageUploadParam=froalaOptions.fileUploadParam='file_data'
|
|
|
|
|
froalaOptions.imageUploadParams=froalaOptions.fileUploadParams={X_OCTOBER_MEDIA_MANAGER_QUICK_UPLOAD:1}
|
|
|
|
|
var placeholder=this.$textarea.attr('placeholder')
|
|
|
|
|
froalaOptions.placeholderText=placeholder?placeholder:''
|
|
|
|
|
froalaOptions.height=this.$el.hasClass('stretch')?Infinity:$('.height-indicator',this.$el).height()
|
|
|
|
|
|