[horde] Imp+HTML editor default font choice (Jan Schneider)
John Gates
dimante at dimante.net
Sat Mar 15 21:00:27 UTC 2008
Ok so here is what I did:
imp/lib/UI/Compose.php
Line 198
case 'imp':
$params['config']['pageStyle'] = 'body{font-family: ' .($GLOBALS['prefs']->getValue('XinFont')). ' ; font-size:75%;}.imp-signature{background-color: #eee;}';
break;
Of course I created this Variable and made sure it went into the prefs database.
Then
Prefs.php
Line 190
//added by dimante
// XinDefaultFont
$_prefs['XinFont'] = array(
'value' => 'Arial',
'locked' => false,
'shared' => false,
'type' => 'enum',
'enum' => array('Arial' => _("Arial"),
'Courier New' => _("Courier New"),
'Georgia' => _("Georgia"),
'Tahoma' => _("Tahoma"),
'Times New Roman' => _("Times New Roman"),
'Verdana' => _("Verdana"),
'impact' => _("Impact"),
'WingDings' => _("WingDings")),
'desc' => _("HTML Editor Default Font:"));
//end add
.. Come to think of it I guess I should have put it under compose prefs... Nonetheless this is where it is.
Then in imp/lib/Identity/imp.php (starting at Line 55) function Identity_imp()
{
parent::Identity();
$this->_properties = array_merge(
$this->_properties,
array('replyto_addr', 'alias_addr', 'tieto_addr', 'bcc_addr',
'signature', 'sig_first', 'sig_dashes', 'save_sent_mail',
'sent_mail_folder', 'XinFont'));
}
And now when I go and set a font choice under my preferences then the HTML editor comes up in the copose window with the font I specify. The same could be done with the font size variable as well. Does this seem like an acceptable addition?
John Gates
Dimante Computer Services LLC
http://www.dimante.netQuoting John Gates <dimante at dimante.net>:
>
>
> The following line is where the editor params could be placed
>
> Compose.php (Line 199)
>
> - $params['config']['pageStyle'] =
> 'body{font-size:75%;}.imp-signature{background-color: #eee;}';
>
> + $params['config']['pageStyle'] = 'body{font-family: Arial;
> font-size:75%;}.imp-signature{background-color: #eee;}';
>
> This works and the editor comes up with the proper font listed and in
> the HTML area.
>
> Obviously a variable saved in the db for font and size with deafults
> if nothing was changed would be ideal.. That is where I am hung up.
> Can anyone facilitate this? If not I have no problem looking into
> this further if it can be added when I am done. Let me know.
>
> Best Regards,
> John Gates
> Dimante Computer Services LLC
> http://www.dimante.netQuoting John Gates <dimante at dimante.net>:
>
>>
>>> Message: 1
>>> Date: Fri, 14 Mar 2008 15:30:31 +0100
>>> From: Jan Schneider <jan at horde.org>
>>> Subject: Re: [horde] Imp+HTML editor default font choice (Jan
>>> Schneider)
>>> To: horde at lists.horde.org
>>> Message-ID: <20080314153031.143058eikcs2j3sw at neo.wg.de>
>>> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
>>> format="flowed"
>>>
>>> Please quote properly when replying on a mailing list.
>>>
>>> Zitat von John Gates <dimante at dimante.net>:
>>>
>>>> Actually that is not working and is still defaulting to Times New
>>>> Roman it seems. Are there any plans to make a default font choice?
>>>> Want me to work on this?
>>>
>>> No, and yes.
>>>
>>> Jan.
>> Ok. I will look at a clean way to do it with integration with the
>> option menu.
>>
>>
>>
>
>
More information about the horde
mailing list