[Kde-pim] asCleanHtml, and thoughts towards html replies to html emails

Stephen Kelly steveire at gmail.com
Thu Oct 2 17:08:48 BST 2008


Hi,

Sorry this mail has taken a while.

Sander van Grieken wrote:
> Can you change the explicit style attributes on elements into style
> classes, and then include a CSS section inline within the HTML part?

I think so. It depends on what you want to do.

> 
> This would avoid hardcoding the various styles used in the mail, and have
> the additional benefit of being able to move the CSS outside the code,
> importing it somewhere from the /usr/share or alternatively the ~/.kde
> tree.

There isn't much hardcoded already. Only things explicitly set by the user
appear in that re-rendered html, like font-size, color, background,
font-family paragraph spacing, alignment. So, this will make a link with a
yellow background and green foreground:

<head>
<style>
a
{
   color:red;
   background-color:yellow;
}
</style>
</head>
<body>
<p> 
A <a href="http://www.kde.org"><span style="color:green;">link</span></a> in
text.
</p>
</body>

The problem is, that that is not what the user saw in their editor before
they clicked send. They saw a green coloured text link, not a green on
yellow link.

Distros can set their own style sheet in the <style> header, but the user
can still select the word in their email composer and change the background
of it, or make it bold, or whatever. So there's no reason to use <span
class=...>. There's also no way. You'd need classes for each possible
combination of color, background, font etc.

Do you have any more knowledge of this or any specific requirements that we
can work on and see if it's possible to satisfy them?

Best regards,

Steve.


_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list