6.0.0-beta1
8/12/25

[#6456] Font and Font Size choices for Xinha editor
Summary Font and Font Size choices for Xinha editor
Queue IMP
Queue Version HEAD
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester dimante (at) dimante (dot) net
Created 03/17/2008 (6357 days ago)
Due
Updated 03/30/2009 (5979 days ago)
Assigned
Resolved 03/30/2009 (5979 days ago)
Milestone
Patch No

History
03/30/2009 11:20:32 PM Michael Slusarz Comment #24
State ⇒ Rejected
Reply to this comment
All of this is irrelevant as Xinha is no longer a supported editor for IMP.
07/13/2008 12:38:07 PM Jan Schneider State ⇒ Accepted
 
04/02/2008 12:28:09 PM dimante (at) dimante (dot) net Comment #23 Reply to this comment
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-


03/24/2008 11:49:58 AM dimante (at) dimante (dot) net Comment #22 Reply to this comment
Well I am stuck on this.  I am not sure of how to build a body tag 
into the message.  Any suggestions?



-D-
03/20/2008 10:14:47 PM dimante (at) dimante (dot) net Comment #21 Reply to this comment
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-


03/20/2008 01:34:26 PM Jan Schneider Comment #20 Reply to this comment
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.
03/20/2008 01:12:34 PM dimante (at) dimante (dot) net Comment #19 Reply to this comment
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?
03/20/2008 12:30:12 PM Jan Schneider Comment #18 Reply to this comment
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.
03/20/2008 12:11:54 PM dimante (at) dimante (dot) net Comment #17 Reply to this comment
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-
03/20/2008 12:06:25 PM Jan Schneider Comment #16 Reply to this comment
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.
03/20/2008 12:02:54 PM Jan Schneider Deleted Original Message
 
03/20/2008 12:02:49 PM Jan Schneider Deleted Original Message
 
03/19/2008 10:19:17 PM dimante (at) dimante (dot) net Comment #15
New Attachment: impchanges3.zip Download
Reply to this comment
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-
03/19/2008 12:58:48 PM dimante (at) dimante (dot) net Comment #14 Reply to this comment
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?
03/19/2008 10:10:11 AM Jan Schneider Comment #13 Reply to this comment
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.
03/19/2008 12:37:05 AM dimante (at) dimante (dot) net Comment #12 Reply to this comment
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-
03/17/2008 11:09:57 PM dimante (at) dimante (dot) net Comment #11
New Attachment: impchanges[1].zip
Reply to this comment
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.
03/17/2008 10:35:10 PM dimante (at) dimante (dot) net Comment #10 Reply to this comment
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>&nbsp;</p> tag in the textarea.  I am reading more about 
Xinha and I am going to see this through 8)



-D-
03/17/2008 09:19:03 PM Chuck Hagenbuch Comment #9 Reply to this comment
03/17/2008 09:18:07 PM Chuck Hagenbuch Comment #8 Reply to this comment
However you made these diffs, add -u to the arguments to the diff program.
03/17/2008 05:26:17 PM dimante (at) dimante (dot) net Comment #7 Reply to this comment
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-
03/17/2008 05:17:49 PM Jan Schneider Comment #6 Reply to this comment
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.
03/17/2008 05:11:28 PM dimante (at) dimante (dot) net Comment #5 Reply to this comment
Prefs.diff:



495a493,523

[Show Quoted Text - 31 lines]
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-
03/17/2008 03:01:21 PM dimante (at) dimante (dot) net Comment #4 Reply to this comment
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?


03/17/2008 02:51:10 PM dimante (at) dimante (dot) net Comment #3 Reply to this comment
Jan,

     I have no idea how to do that :-(

-D-


03/17/2008 02:21:50 PM Jan Schneider Comment #2
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Please provide your changes as a unified diff.
03/17/2008 11:37:25 AM dimante (at) dimante (dot) net Comment #1
Priority ⇒ 2. Medium
State ⇒ New
New Attachment: impchanges.zip
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Font and Font Size choices for Xinha editor
Type ⇒ Enhancement
Reply to this comment
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.






Saved Queries