diff --git a/api/js/etemplate/et2_widget_htmlarea.ts b/api/js/etemplate/et2_widget_htmlarea.ts
index e3d87e0c98..e6df32820e 100644
--- a/api/js/etemplate/et2_widget_htmlarea.ts
+++ b/api/js/etemplate/et2_widget_htmlarea.ts
@@ -276,9 +276,10 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
{
ed.on('init', function()
{
- this.getDoc().body.style.fontSize = egw.preference('rte_font_size', 'common')
- + egw.preference('rte_font_unit', 'common');
- this.getDoc().body.style.fontFamily = egw.preference('rte_font', 'common');
+ this.focus();
+ this.execCommand('fontName', false, egw.preference('rte_font', 'common'));
+ this.execCommand('fontSize', false, egw.preference('rte_font_size', 'common')
+ + egw.preference('rte_font_unit', 'common'));
});
}
};
@@ -295,6 +296,9 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
{
self.editor.formatter.toggle(egw.preference('rte_formatblock', 'common'));
jQuery(self.editor.editorContainer).height(self.options.height);
+ self.editor.execCommand('fontName', false, egw.preference('rte_font', 'common'));
+ self.editor.execCommand('fontSize', false, egw.preference('rte_font_size', 'common')
+ + egw.preference('rte_font_unit', 'common'));
jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){
if (jQuery('#dragover-tinymce').length < 1) jQuery("").appendTo('head');
});