* Mail: Fix htmlEditor does not include styling on each tag causing mail content sent with no styling

This commit is contained in:
Hadi Nategh 2022-05-03 15:28:21 +02:00
parent 38d44ee3e2
commit ed5e7414ac

View File

@ -276,9 +276,10 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
{
ed.on('init', function()
{
this.getDoc().body.style.fontSize = <string><unknown>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, <string><unknown>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(<string><unknown>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, <string><unknown>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("<style id='dragover-tinymce'>.dragover:after {height:calc(100% - "+jQuery(this).height()+"px) !important;}</style>").appendTo('head');
});