forked from extern/egroupware
Add format block as preference for pre-selecting block on editor initialization
This commit is contained in:
parent
56989f338b
commit
74100f53ae
@ -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');
|
||||
|
@ -417,6 +417,25 @@ class preferences_hooks
|
||||
'admin' => false,
|
||||
'default' => '10'
|
||||
),
|
||||
'rte_formatblock' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Default format block',
|
||||
'name' => 'rte_formatblock',
|
||||
'values' => array(
|
||||
'p' => lang("Paragraph"),
|
||||
'h1' => lang("Heading 1"),
|
||||
'h2' => lang("Heading 2"),
|
||||
'h3' => lang("Heading 3"),
|
||||
'h4' => lang("Heading 4"),
|
||||
'h5' => lang("Heading 5"),
|
||||
'h6' => lang("Heading 6"),
|
||||
'pre' => lang("Preformatted")
|
||||
),
|
||||
'help' => 'Automatically start with this format block',
|
||||
'xmlrpc' => True,
|
||||
'admin' => false,
|
||||
'default' => 'p'
|
||||
),
|
||||
'rte_menubar' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Enable menubar',
|
||||
|
Loading…
Reference in New Issue
Block a user