Full HTML Support for Mailody

All KMail users will know this widget to setup their signature:

signature editor

Yesterday evening I moved this widget to kdepimlibs. One of the few classes within KMail that can be moved without untangling at least 40 other classes.

The result of that move and integrating it into Mailody means that Mailody gained support for signatures coming from files or from the output of a command.

Then I looked at the KRichTextWidget which is now in review. I know the author will give more info about it in one of the next digest, so I won’t spoil all the fun, but basically it is the start of a wysiwyg html editor for KDE. I decided to implement that in Mailody’s composer. That means that from the moment the class moves to kdelibs, it will be possible to send html-mails from within Mailody.

Integrating it in the sending parts of Mailody was easy, as Mailody already had the option to automatically send a html-part of the message with each message. For those wondering: yes at the first glance it seems perfectly possible to reply to html-only mails too, the formatting will stay preserved.

After that I went back to the signature configurator, there it is also possible to insert HTML code by hand and use that as a signature. I decided that it would be good to have the wysiwyg editor there too.

So, that means it now looks like this:

New signature configurator with wysiwyg

The beauty of it, is that KMail automatically also gets this. Sharing is great. It also means Mailody got complete HTML support now. I need to tweak some things whenever the class is moved to kdelibs, but the hard work is already done.

11 Comments

  1. I would say “disabling removes formatting” rather than “disabling loses formatting”…

    Danny

  2. wouldn’t it be easier to use webkits midas support?

    implementing something like http://www.rtef.info/demo.htm (open in qts browser demo, and click “switch to html mode” and back to make it work correctly ;)) with qts dom api instead of javascript should be much less painfull than writing a new “html”-renderer. also it would be much more wysiwyg because webkit isn’t that far of the khtml kpart used for displaying incoming mail.

  3. As it was for kde3 as well.

  4. Minor complaint: shouldn’t it be “loses” not “looses”?

  5. Looks good; one correction though: “looses” should be “loses” in the second screenshot.

  6. Hopefully it will.

  7. Hi,

    Nice work.

    I only wonder if the “complete” support is the same “complete” as it was in KMail for years. Means that it is as complete as the developer believes it should be.

    Can I do something like ‘img src=”cid:mycoolimage.jpg”‘? should I go through all the nightmare of attaching images by hand to do that? defining templates and such?

    I hope there is a hope for KDE to have an HTML mailer someday. Otherwise to send a pretty email one will have to use PDF generated with KOffice.

    Thanks!

  8. Will Mailody be «KMail 4» or is it just another e-mail client?

  9. Does this use the Qt4 cursor/richtext support to do its job? That’s why I rewrote it for KOrganizer because the KMail library didn’t feel as “nice” to me at the time.

    If it has improved then I’d like to see it!

  10. Shriramana Sharma

    It would be better to say “Disabling will cause all formatting to be lost”.

  11. those things do not happen automatically, you need to write them. Images is pretty high on the list whenever this is completed and most of the bugs are gone. As we now share this editor between kmail, mailody, kjots and whatever, there will be more resources available to implement it. hang in there.