| Summary | Font and Font Size choices for Xinha editor |
| Queue | IMP |
| Queue Version | HEAD |
| Type | Enhancement |
| State | Feedback |
| Priority | 1. Low |
| Owners | |
| Requester | dimante (at) dimante (dot) net |
| Created | 03/17/2008 (53 days ago) |
| Due | |
| Updated | 04/02/2008 (37 days ago) |
| Assigned | |
| Resolved | |
| Attachments | impchanges3.zip ![]() |
| Milestone | |
| Patch |
I was not asking that you do it just to give me some guidance on where I should look to add this. I am still new to the backend of IMP. Any pointers?
-D-
Well I am stuck on this. I am not sure of how to build a body tag into the message. Any suggestions?
-D-
>> Is that something that could happen?
>
> If you, or anybody else, is providing a patch, yes.
>
>> You are speaking in terms of
>> placing a body tag with the class directive for font and size?
>
> No. CSS rules for body tag, or style attributes inside the body tag.
I will look through the code and see what I can come up with. Any hints on where I can find the parts that you speak of. Would this be compose.php?
P.S. Thanks for taking the time to answer the many questions. I know you guys are very busy.
-D-
> Is that something that could happen?
If you, or anybody else, is providing a patch, yes.
> You are speaking in terms of
> placing a body tag with the class directive for font and size?
No. CSS rules for body tag, or style attributes inside the body tag.
> The only way to implement this properly as I see it, is to change the
> code so that we create a complete HTML document when sending HTML
> messages. At the moment we only send HTML snippets. This HTML
> document could contain a font style for the body.
Is that something that could happen? You are speaking in terms of placing a body tag with the class directive for font and size?
The only way to implement this properly as I see it, is to change the code so that we create a complete HTML document when sending HTML messages. At the moment we only send HTML snippets. This HTML document could contain a font style for the body.> Btw, it's possible to create patches that covers all modified files
> at once. Much easier than creating a ZIP file each time.
Will man diff show me how to do the above? I still think that the ability to choose the font that you see in the editor, even if it does not show on the recipients side would still be a good enhancement. I do see that when I send messages to Outlook and other popular clients that the fonts do stay in tact with the latest changes I uploaded. Can you think of another way to keep the tag from getting cleaned by horde?
-D-
> I found through testing that the span tag
> is the best to provide this functionality.
Not really, because SPANs are inline tags that can't be put around block tags.
> If not I see that '<p
> class="imp-signature">' is allowed.. I am not sure how to add a
> class .imp-font and provide it that way... I am assuming that '<span
> class="imp-font">' may make it by the filter. Where would I go to
> add that class?
That wouldn't help because the recipient client doesn't know about this class. That's why we use the imp-signature class; it's only rendered in IMP's compose screen.
Btw, it's possible to create patches that covers all modified files at once. Much easier than creating a ZIP file each time.
New Attachment: impchanges3.zip
Here are the latest diffs. I found through testing that the span tag is the best to provide this functionality. If there is a way to get that HTML cleaner to allow the span style command that would be good. In Netscape the span work perfect. It's Internet explorer where horde is involved the class gets scrubbed. If not I see that '<p class="imp-signature">' is allowed.. I am not sure how to add a class .imp-font and provide it that way... I am assuming that '<span class="imp-font">' may make it by the filter. Where would I go to add that class?
-D-
> If you are replying to HTML messages they are run through the XSS
> filter. This filters out some tags and attributes depending on the
> browser version.
Can I submit my latest changes to you and see if they are acceptable?
If you are replying to HTML messages they are run through the XSS filter. This filters out some tags and attributes depending on the browser version.Well I did more digging and find that adding a span tag works much more consistently in Firefox but in IE7 I get:
XSSCleaned="font-family: impact;" This seems like a Horde behavior to me.. I know IE7 does not provide this protection. So the bottom line is I have figured out a way to get the font to display in the editor in a chosen font and with the span tag the entire body of the message is sent and received in the drafted font in Firefox. Not sure why the XSSCleaned="font-family: impact;" does not work in firefox. If you can elaborate on this I would appreciate it. I think the ability to select the font would be a nice addition.
Thanks,
-D-
New Attachment: impchanges[1].zip
Here's what I have so far. This works completely if the user has a signature. I need a little help on applying it when they don't thoughts?
Thanks
-D-
P.S. I have attached the files in the requested format in a zip file.
Chuck,
Thanks that will help greatly.
Jan,
I will download the latest head and I have not given up on this. I have the editor displaying a chosen font. I just need to get that into the <p> </p> tag in the textarea. I am reading more about Xinha and I am going to see this through 8)
-D-
This may help you: http://www.horde.org/source/contribute.phpHowever you made these diffs, add -u to the arguments to the diff program.I guess ideally you would want it to get sent with the message.. Did not see that before. What are the steps to create a unified diff? I will look into this further and see if the font can carry with the message... But if I don't know how to diff it to you I guess it won't matter much.
-D-
> Is this way what you are looking for?
Almost, though this is a context diff, not a unified diff, and please upload them as attachments to this ticket.
But your patch doesn't work anyway. Unless I'm missing somthing, it's only setting the default font for the display when composing a message. This font should never get sent with the actual message though.
Prefs.diff:
495a493,523
> // 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:"));
>
> //Html Editor Font Size
> $_prefs['XinFontSize'] = array(
> 'value' => '10pt',
> 'locked' => false,
> 'shared' => false,
> 'type' => 'enum',
> 'enum' => array('8pt' => _("8pt"),
> '10pt' => _("10pt"),
> '12pt' => _("12pt"),
> '14pt' => _("14pt"),
> '18pt' => _("18pt"),
> '24pt' => _("24pt"),
> '36pt' => _("36pt")),
> 'desc' => _("HTML Editor Default Font Size:"));
>
499c527
If this is not what is desired if you can let me know how to prepare it I will do what is needed.
-D-
Compose.diff:
199c199,202
< $params['config']['pageStyle'] = 'body{font-size:75%;}.imp-signature{background-color: #eee;}';
---
>
> $params['config']['pageStyle'] = 'body{font-family:' .($GLOBALS['prefs']->getValue('XinFont')). '; font-size:' .($GLOBALS['prefs']->getValue('XinFontSize')). ';}.imp-signature{background-color: #eee;}';
>
>
Is this way what you are looking for?
Jan,
I have no idea how to do that :-(
-D-
Priority ⇒ 1. Low
State ⇒ Feedback
Please provide your changes as a unified diff.New Attachment: impchanges.zip
Patch ⇒
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Font and Font Size choices for Xinha editor
Type ⇒ Enhancement
Priority ⇒ 2. Medium
State ⇒ New
I made the attached changes and the Font and Size for the HTML IMP editor can now be
set in the compose options menu. I tried to send the mods through the list but they
were too long for the post. Do you think this can be added to the project? I have
tested in IE, Mozilla, and Safari and it seems to work for all.