diff --git a/api/js/etemplate/et2_widget_htmlarea.js b/api/js/etemplate/et2_widget_htmlarea.js
index ff74497f14..accf7ef33d 100644
--- a/api/js/etemplate/et2_widget_htmlarea.js
+++ b/api/js/etemplate/et2_widget_htmlarea.js
@@ -8,7 +8,6 @@
* @link http://www.egroupware.org
* @author Hadi Nategh
* @copyright Hadi Nategh
- * @version $Id$
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
@@ -99,6 +98,11 @@ var et2_htmlarea = /** @class */ (function (_super) {
theme: 'silver'
},
formats: {
+ // setting p (and below also the preferred formatblock) to the users font and -size preference
+ p: { block: 'p', styles: {
+ "font-family": (egw.preference('rte_font', 'common') || 'arial, helvetica, sans-serif'),
+ "font-size": (egw.preference('rte_font_size', 'common') || '10') + 'pt'
+ } },
customparagraph: { block: 'p', styles: { "margin-block-start": "0px", "margin-block-end": "0px" } }
},
min_height: 100,
@@ -135,6 +139,10 @@ var et2_htmlarea = /** @class */ (function (_super) {
"MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;" +
"Wingdings=wingdings,zapf dingbats",
fontsize_formats: '8pt 10pt 12pt 14pt 18pt 24pt 36pt',
+ // this displays all p and li with the users default font and -size (only kosmetik, as TinyMCE does not return or set these styles!)
+ content_style: (egw.preference('rte_formatblock', 'common') || 'p') + ',li' +
+ ' { font-family: ' + (egw.preference('rte_font', 'common') || 'arial, helvetica, sans-serif') +
+ '; font-size: ' + (egw.preference('rte_font_size', 'common') || '10') + 'pt }',
setup: function (ed) {
ed.on('init', function () {
this.execCommand('fontName', false, egw.preference('rte_font', 'common'));
@@ -143,6 +151,11 @@ var et2_htmlarea = /** @class */ (function (_super) {
});
}
};
+ var rte_formatblock = (egw.preference('rte_formatblock', 'common') || 'p');
+ if (rte_formatblock !== 'p') {
+ settings.formats[rte_formatblock] = jQuery.extend(true, {}, settings.formats.p);
+ settings.formats[rte_formatblock].block = rte_formatblock;
+ }
// extend default settings with configured options and preferences
jQuery.extend(settings, this._extendedSettings());
this.tinymce = tinymce.init(settings);