KTextEditor && richtext (Re: [Design] New composer.)

Vadim Plessky lucy-ples at mtu-net.ru
Sun Dec 1 16:11:21 GMT 2002


On Sunday 01 December 2002 6:40 pm, Marc Mutz wrote:
|  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 ;-)

What is SVGVisitor?...

|
[...]
|  >
|  > what about lists?
|  > <ul>
|  >  <li>aaaa</li>
|  >  <li>bbbb</li>
|  > </ul>
|  > Lists are quite handy.
|
|  2a ;-)

Oops, sorry, I missed it in your list...

|
|  > |  (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 );
|     }
|     // ...
|  };

Hmm. Is concept of Visitor is unique to KDE, or it's in some RFC / W3C 
standard?
As I wrote above, I am confiused what do you mean under SVG visitor.

|
|  > 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.

It is *not crap*!
You get security problems with HTML (in mails) in two cases:
* JavaScript code in HTML mail
* downloading images from extrenal references, like other web site, etc.

As I said, scripting should be *disabled* for SVG completly.
As about images:  as SVG has quite powerful imagine model, Real People would 
use in e-mails SVG drawings, not PNG (or GIF, or JPEG).
So, I think any kind of pixmap'ed images can be idsabled (at least by default) 
in SVG mails.

|
|  <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.

ok! :-)

|
|  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.

And that's really Good, as I am not subscribed to KMail mailing list.
The reason why I unsubscribed is because KMail-related bug reports are going 
directly to that list.  And I just can't handle such traffic, it's thousands 
of mails per month.
If you can cerate <kmail-bugs> mailing list (just like Konq kas <konq-bugs> 
ML) - life woul dbe much better, and we can continue discussion on <kmail> 
ML. :-)

|
|  Marc

Cheers,
-- 

Vadim Plessky
SVG Icons * BlueSphere Icons 0.3.0 released
http://svgicons.sourceforge.net
My KDE page
http://kde2.newmail.ru  (English)
KDE mini-Themes
http://kde2.newmail.ru/themes/




More information about the kde-core-devel mailing list