mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 20:39:13 +02:00
* Mail: Add custom html toolbar settings in mail site-configuration in order to be able to add/remove certain actions only for mail-compose dialog.
This commit is contained in:
@@ -83,6 +83,12 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
||||
description: "Enables to control what child tag is allowed or not allowed of the present tag. For instance: +body[style], makes style tag allowed inside body",
|
||||
type: "string",
|
||||
default: "+body[style]"
|
||||
},
|
||||
toolbar: {
|
||||
'name': 'Toolbar',
|
||||
'description': 'Comma separated string of toolbar actions. It will only be considered if no Mode is restricted.',
|
||||
'default': '',
|
||||
'type': 'string'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -93,7 +99,7 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
||||
public static readonly TOOLBAR_LIST : string[] = ['undo', 'redo', 'formatselect', 'fontselect', 'fontsizeselect',
|
||||
'bold', 'italic', 'strikethrough', 'forecolor', 'backcolor', 'link',
|
||||
'alignleft', 'aligncenter', 'alignright', 'alignjustify', 'numlist',
|
||||
'bullist', 'outdent', 'indent', 'ltr', 'rtl', 'removeformat', 'code', 'image', 'searchreplace'
|
||||
'bullist', 'outdent', 'indent', 'ltr', 'rtl', 'removeformat', 'code', 'image', 'searchreplace', 'fullscreen'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -117,8 +123,8 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
||||
* @constant
|
||||
*/
|
||||
public static readonly TOOLBAR_ADVANCED : string = "undo redo| formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"link | alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent ltr rtl | removeformat code| image | searchreplace | fullscreen";
|
||||
"alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen";
|
||||
|
||||
/**
|
||||
* font size formats
|
||||
@@ -146,6 +152,7 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
||||
supportedWidgetClasses : any;
|
||||
htmlNode : JQuery = null;
|
||||
mode : string;
|
||||
toolbar: string;
|
||||
tinymce : any;
|
||||
tinymce_container : HTMLElement;
|
||||
file_picker_callback : Function;
|
||||
@@ -409,10 +416,14 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
||||
let rte_menubar = <string>egw.preference('rte_menubar', 'common');
|
||||
let rte_toolbar = egw.preference('rte_toolbar', 'common');
|
||||
// we need to have rte_toolbar values as an array
|
||||
if (rte_toolbar && typeof rte_toolbar == "object")
|
||||
if (rte_toolbar && typeof rte_toolbar == "object" && this.toolbar == '')
|
||||
{
|
||||
rte_toolbar = Object.keys(rte_toolbar).map(function(key){return rte_toolbar[key]});
|
||||
}
|
||||
else if(this.toolbar != '')
|
||||
{
|
||||
rte_toolbar = this.toolbar.split(',');
|
||||
}
|
||||
let settings = {
|
||||
fontsize_formats: et2_htmlarea.FONT_SIZE_FORMATS[<string>egw.preference('rte_font_unit', 'common')],
|
||||
menubar: parseInt(rte_menubar) && this.menubar ? true : typeof rte_menubar != 'undefined' ? false : this.menubar
|
||||
|
Reference in New Issue
Block a user