mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-30 02:37:16 +00:00
(feature) Custom base font size for HTML messages
If SOGoMailComposeFontSize is set to zero, we keep the previous behaviour (no font-size added to the message HTML body).
This commit is contained in:
@@ -26,6 +26,15 @@
|
||||
// Mail editor autosave is a number of minutes or 0 if disabled
|
||||
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;
|
||||
|
||||
// Specify a base font size for HTML messages when SOGoMailComposeFontSize is not zero
|
||||
data.SOGoMailComposeFontSizeEnabled = parseInt(data.SOGoMailComposeFontSize) > 0;
|
||||
|
||||
if (window.CKEDITOR && data.SOGoMailComposeFontSize) {
|
||||
// HTML editor is enabled; set user's preferred font size
|
||||
window.CKEDITOR.config.fontSize_defaultLabel = data.SOGoMailComposeFontSize;
|
||||
window.CKEDITOR.addCss('.cke_editable { font-size: ' + data.SOGoMailComposeFontSize + 'px; }');
|
||||
}
|
||||
|
||||
// We convert our list of autoReplyEmailAddresses/forwardAddress into a string.
|
||||
// We also convert our date objects into real date, otherwise we'll have strings
|
||||
// or undefined values and the md-datepicker does NOT like this.
|
||||
@@ -201,6 +210,9 @@
|
||||
|
||||
preferences.defaults.SOGoMailLabelsColors = labels;
|
||||
|
||||
if (!preferences.defaults.SOGoMailComposeFontSizeEnabled)
|
||||
preferences.defaults.SOGoMailComposeFontSize = 0;
|
||||
|
||||
if (preferences.defaults.Vacation) {
|
||||
if (preferences.defaults.Vacation.endDateEnabled)
|
||||
preferences.defaults.Vacation.endDate = preferences.defaults.Vacation.endDate.getTime()/1000;
|
||||
|
||||
@@ -23,17 +23,6 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
config.tabSpaces = 4;
|
||||
config.allowedContent = true; // don't filter tags
|
||||
|
||||
// The list of fonts size to be displayed in the Font Size combo in the toolbar.
|
||||
config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;13/13px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
|
||||
|
||||
// Explicitly show the default site font size to the end user (as defined in contents.css)
|
||||
config.fontSize_defaultLabel = '13px';
|
||||
|
||||
// The CSS file(s) to be used to apply style to editor content.
|
||||
// For example, the following ck.css could overwrite the font-size of .cke_editable
|
||||
//config.contentsCss = ['/SOGo.woa/WebServerResources/js/vendor/ckeditor/contents.css', // default CSS
|
||||
// '/css/ck.css']; // custom CSS
|
||||
|
||||
// Disables the built-in words spell checker if browser provides one. Defaults to true.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableNativeSpellChecker
|
||||
//config.disableNativeSpellChecker = false;
|
||||
|
||||
Reference in New Issue
Block a user