Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-24-2007, 04:45 AM
Junior Member
 
Posts: 7
Default [SOLVED] Accessing Message Body

Is there any way that Zimlets can modify the contents of the e-mail body? I don't think this was the intention for Zimlets, in which case is the only way to acheive this, to modify the source?

I basically just need the ability to replace all the text in the content with a preset string when an option in a Zimlet context menu is clicked.
Reply With Quote
  #2 (permalink)  
Old 08-24-2007, 07:59 AM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by henrythacker View Post
Is there any way that Zimlets can modify the contents of the e-mail body? I don't think this was the intention for Zimlets, in which case is the only way to acheive this, to modify the source?

I basically just need the ability to replace all the text in the content with a preset string when an option in a Zimlet context menu is clicked.
For a message that is being composed, or a message that already exists? For compose, no problem. For a message that already exists, it's much more dicey since it also involves re-indexing the message, etc.

For a message that is being composed, you should be able to grab the div that represents the edit element and replace it there.
Reply With Quote
  #3 (permalink)  
Old 08-24-2007, 08:19 AM
Zimbra Employee
 
Posts: 26
Default

If you find the spell checking code, then you'll see how the content of a composed message is accessed.
Reply With Quote
  #4 (permalink)  
Old 08-24-2007, 08:24 AM
Junior Member
 
Posts: 7
Default

Cheers guys - I am doing this to try and set up some kind of Signatures or Email templates system. If I get anything good out of this - will probably release this. You wouldn't have a link to the spell check demo would you?

Last edited by henrythacker; 08-24-2007 at 08:26 AM..
Reply With Quote
  #5 (permalink)  
Old 08-24-2007, 09:04 AM
Zimbra Employee
 
Posts: 26
Default

ZimbraWebClient/WebRoot/js/zimbraMail/share/view/htmlEditor/ZmHtmlEditor.js

That's your pot of gold, I think.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.