mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Added "Default text editor" options (Html forced and Plain forced) (Closes #341)
This commit is contained in:
parent
5e8a57f6a3
commit
25c56937f6
29 changed files with 77 additions and 4 deletions
|
|
@ -216,7 +216,9 @@
|
|||
*/
|
||||
Enums.EditorDefaultType = {
|
||||
'Html': 'Html',
|
||||
'Plain': 'Plain'
|
||||
'Plain': 'Plain',
|
||||
'HtmlForce': 'HtmlForce',
|
||||
'PlainForce': 'PlainForce'
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -60,6 +60,16 @@
|
|||
this.mppTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.isAnimationSupported = Globals.bAnimationSupported;
|
||||
|
||||
this.editorDefaultTypes = ko.computed(function () {
|
||||
Globals.langChangeTrigger();
|
||||
return [
|
||||
{'id': Enums.EditorDefaultType.Html, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_AS_DEFAULT')},
|
||||
{'id': Enums.EditorDefaultType.Plain, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_AS_DEFAULT')},
|
||||
{'id': Enums.EditorDefaultType.HtmlForce, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_FORCE_AS_DEFAULT')},
|
||||
{'id': Enums.EditorDefaultType.PlainForce, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_FORCE_AS_DEFAULT')}
|
||||
];
|
||||
}, this);
|
||||
}
|
||||
|
||||
GeneralUserSetting.prototype.toggleLayout = function ()
|
||||
|
|
|
|||
|
|
@ -921,7 +921,8 @@
|
|||
|
||||
this.editor(function (oEditor) {
|
||||
oEditor.setHtml(sText, false);
|
||||
if (!oMessage.isHtml())
|
||||
if (Enums.EditorDefaultType.PlainForce === Data.editorDefaultType() ||
|
||||
(!oMessage.isHtml() && Enums.EditorDefaultType.HtmlForce !== Data.editorDefaultType()))
|
||||
{
|
||||
oEditor.modeToggle(false);
|
||||
}
|
||||
|
|
@ -940,7 +941,8 @@
|
|||
|
||||
this.editor(function (oEditor) {
|
||||
oEditor.setHtml(sText, false);
|
||||
if (Enums.EditorDefaultType.Html !== Data.editorDefaultType())
|
||||
if (Enums.EditorDefaultType.Html !== Data.editorDefaultType() &&
|
||||
Enums.EditorDefaultType.HtmlForce !== Data.editorDefaultType())
|
||||
{
|
||||
oEditor.modeToggle(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue