KTextEditor && richtext (Re: [Design] New composer.)
Marc Mutz
Marc.Mutz at uni-bielefeld.de
Sun Dec 1 15:40:11 GMT 2002
On Sunday 01 December 2002 16:13, Vadim Plessky wrote:
> On Sunday 01 December 2002 4:18 pm, Marc Mutz wrote:
<snip>
> What about 'image/xml+svg' (SVG) than?
> You can go to Tiny SVG or SVG Mobile profile, there is no need in
> scripting for your particular application (KMail)
If someone would want to do that, then it would be possible to write a
SVGVisitor. Don't hold you breath, though ;-)
> | For rich text in emails, the most important things are (in order
> | of importance):
> |
> | 1. bold, italics and underline (*bold*, /italics/ and _underline_)
> | 2. fixed and proportional font (ascii art vs. flowed text)
> | 2a. lists (bullet and ordered)
> | 3. horizontal alignment ( this is centered )
> | 4. left/right margin
> | 5. size
> | 6. color
> | 7. font
>
> what about lists?
> <ul>
> <li>aaaa</li>
> <li>bbbb</li>
> </ul>
> Lists are quite handy.
2a ;-)
> | (2/2a) can even be expressed in text/plain format (2:
> | format=flowed only), while everything but (I guess) margins can be
> | expressed in t/enriched.
> |
> | If KMail send HTML-mails, then people are softly forced to accept
> | html mail. That's a big step backwards in perceived security of
> | KMail.
>
> what about 'multipart/alternative' mail format (hope I have spelled
> it right) If you get mail with both text/plain and text/html (and
> even with image/xml+svg), than it's up to user preferences - wether
> to render mail using HTML, or display SVG or just plain text.
class MultipleVisitor : public KTextEditor::RichTextVisitor {
QPtrList<KTextEditor::RichTextVisitor> mVisitors;
public:
void addVisitor( const KTextEditor::RichTextVisitor * v ) {
if ( !v ) return;
mVisitors.append( v );
}
void visitPlainText( const QString & plainText ) {
for ( QPtrList<KTextEditor::RichTextVisitor>::iterator
it = mVisitors.begin() ; it != mVisitors.end() ; ++it )
it->visitPlainText( plainText );
}
// ...
};
> BTW: I think sending mails in SVG is really cool! :-)
It's not! It's the same crap as HTML mails. You get the same security
issues that you get with HTML.
<snip>
> I think XHTML Basic+CSS should be used (not HTML, not XHTML 1.0,
> 1.1).
Actually, for HTML mails, HTML 2.0 is what should suffice ;-)
But you could write whatever visitor/builder you like.
PS: Let's discuss KMail-releated things on kmail at kde.org. I've
crossposted core-devel mainly to get feedback on the Visitor/Builder
pattern for KTextEditor.
Marc
--
'When you see the ping of death, duck and cover.'
-- Bruce Schneier, Crypto-Gram Oct 2002
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021201/2d915d8e/attachment.sig>
More information about the kde-core-devel
mailing list