Add option to enable HTML editor always, except when replying to plain text messages (#1489365)

pull/294/head
Aleksander Machniak 9 years ago
parent 87d6d214f9
commit 6ca1e6add1

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Add option to enable HTML editor always, except when replying to plain text messages (#1489365)
- Emoticons: Added option to switch on/off emoticons in compose editor (#1485732) - Emoticons: Added option to switch on/off emoticons in compose editor (#1485732)
- Emoticons: Added option to switch on/off emoticons in plain text messages - Emoticons: Added option to switch on/off emoticons in plain text messages
- Emoticons: All emoticons-related functionality is handled by the plugin now - Emoticons: All emoticons-related functionality is handled by the plugin now

@ -1015,7 +1015,11 @@ $config['message_extwin'] = false;
$config['compose_extwin'] = false; $config['compose_extwin'] = false;
// compose html formatted messages by default // compose html formatted messages by default
// 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message // 0 - never,
// 1 - always,
// 2 - on reply to HTML message,
// 3 - on forward or reply to HTML message
// 4 - always, except when replying to plain text message
$config['htmleditor'] = 0; $config['htmleditor'] = 0;
// save copies of compose messages in the browser's local storage // save copies of compose messages in the browser's local storage

@ -474,6 +474,7 @@ $labels['deletejunk'] = 'Directly delete messages in Junk';
$labels['showremoteimages'] = 'Display remote inline images'; $labels['showremoteimages'] = 'Display remote inline images';
$labels['fromknownsenders'] = 'from known senders'; $labels['fromknownsenders'] = 'from known senders';
$labels['always'] = 'always'; $labels['always'] = 'always';
$labels['alwaysbutplain'] = 'always, except when replying to plain text';
$labels['showinlineimages'] = 'Display attached images below the message'; $labels['showinlineimages'] = 'Display attached images below the message';
$labels['autosavedraft'] = 'Automatically save draft'; $labels['autosavedraft'] = 'Automatically save draft';
$labels['everynminutes'] = 'every $n minute(s)'; $labels['everynminutes'] = 'every $n minute(s)';

@ -716,13 +716,14 @@ function rcmail_compose_editor_mode()
$useHtml = rcmail_message_is_html(); $useHtml = rcmail_message_is_html();
} }
else if ($compose_mode == RCUBE_COMPOSE_REPLY) { else if ($compose_mode == RCUBE_COMPOSE_REPLY) {
$useHtml = ($html_editor == 1 || ($html_editor >= 2 && rcmail_message_is_html())); $useHtml = $html_editor == 1 || ($html_editor >= 2 && rcmail_message_is_html());
} }
else if ($compose_mode == RCUBE_COMPOSE_FORWARD) { else if ($compose_mode == RCUBE_COMPOSE_FORWARD) {
$useHtml = ($html_editor == 1 || ($html_editor == 3 && rcmail_message_is_html())); $useHtml = $html_editor == 1 || $html_editor == 4
|| ($html_editor == 3 && rcmail_message_is_html());
} }
else { else {
$useHtml = ($html_editor == 1); $useHtml = $html_editor == 1 || $html_editor == 4;
} }
return $useHtml; return $useHtml;

@ -672,9 +672,10 @@ function rcmail_user_prefs($current = null)
$select = new html_select(array('name' => '_htmleditor', 'id' => $field_id)); $select = new html_select(array('name' => '_htmleditor', 'id' => $field_id));
$select->add($RCMAIL->gettext('never'), 0); $select->add($RCMAIL->gettext('never'), 0);
$select->add($RCMAIL->gettext('always'), 1);
$select->add($RCMAIL->gettext('htmlonreply'), 2); $select->add($RCMAIL->gettext('htmlonreply'), 2);
$select->add($RCMAIL->gettext('htmlonreplyandforward'), 3); $select->add($RCMAIL->gettext('htmlonreplyandforward'), 3);
$select->add($RCMAIL->gettext('always'), 1);
$select->add($RCMAIL->gettext('alwaysbutplain'), 4);
$blocks['main']['options']['htmleditor'] = array( $blocks['main']['options']['htmleditor'] = array(
'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('htmleditor'))), 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('htmleditor'))),

Loading…
Cancel
Save