Hello,
I am working on a rather perplexing issue.
I cannot seem to set HTML to be the default editor when replying to an email. When composing a message, the HTML editor kicks in just fine. This is only an issue when replying to or forwarding a message.
This fix should reside in the portion of code in /programs/steps/mail/compose.inc
function rcmail_editor_selector($attrib)
{
global $CONFIG, $MESSAGE, $compose_mode;
$choices = array(
'html' => 'htmltoggle',
'plain' => 'plaintoggle'
);
// determine whether HTML or plain text should be checked
if ($CONFIG['htmleditor'])
$useHtml = true;
else
$useHtml = false;
if ($compose_mode == RCUBE_COMPOSE_REPLY ||
$compose_mode == RCUBE_COMPOSE_FORWARD ||
$compose_mode == RCUBE_COMPOSE_DRAFT)
{
$hasHtml = rcmail_has_html_part($MESSAGE['parts']);
$useHtml = ($hasHtml && $CONFIG['htmleditor']);
}
$selector = '';
$attrib['name'] = '_editorSelect';
$attrib['onchange'] = 'return rcmail_toggle_editor(this)';
foreach ($choices as $value => $text)
{
$checked = '';
if ((($value == 'html') && $useHtml) ||
(($value != 'html') && !$useHtml))
$attrib['checked'] = 'true';
else
unset($attrib['checked']);
$attrib['id'] = '_' . $value;
$rb = new radiobutton($attrib);
$selector .= sprintf("%s",
$rb->show($value),
$attrib['id'],
rcube_label($text));
}
return $selector;
}
I have tried to toggle the values to switch the "checked" value from Plain Text (the default) to HTML with no luck, since this is the function which generates the "checked" value for those radio buttons. Frankly, I am stumped at this point any help would be appreciated.
BTW, in the main config file, editing is set for HTML:
// prefer displaying HTML messages
$rcmail_config['prefer_html'] = TRUE;
// compose html formatted messages by default
$rcmail_config['htmleditor'] = TRUE;
I am using RC Version: 0.1.1
Thanks.