Add format block as preference for pre-selecting block on editor initialization

This commit is contained in:
Hadi Nategh
2019-10-09 16:22:23 +02:00
parent 56989f338b
commit 74100f53ae
2 changed files with 20 additions and 0 deletions

View File

@ -198,6 +198,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([
self.set_value(self.htmlNode.val());
if (self.editor && self.editor.editorContainer)
{
self.editor.formatter.toggle(egw.preference('rte_formatblock', 'common'));
jQuery(self.editor.editorContainer).height(self.options.height);
jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){
if (jQuery('#dragover-tinymce').length < 1) jQuery("<style id='dragover-tinymce'>.dragover:after {height:calc(100% - "+jQuery(this).height()+"px) !important;}</style>").appendTo('head');