My Account   Contact Us    
» HomeProductsSupportDeveloper CommunityCompany
Mailto links damaged when pasting from Word

Mailto links can be changed when pasting from Word. This is a solution.

 Jeff ( Wrote:

I found that this was happening with my users when they would write a document in Word, then Word would automatically convert an email address into a clickable address, and the user then pasted all the content from Word into ActivEdit using the paste button. The ActivEdit 4 Word cleaner removes all o: prefixes -- which inadvertently turns "mailto:" into "mailt"  The code that does this is in ae_cleanWord is:

newData = newData.replace(/o:/g, ""); // remove all o: prefixes

Using a modified version of the Word cleaner through the API, I surrounded this line with a simple fix:

      newData = newData.replace(/mailto:/g, "TEMPMAILTO") // to prevent the o: prefix removal from breaking mailto:
      newData = newData.replace(/o:/g, ""); // remove all o: prefixes
      newData = newData.replace(/TEMPMAILTO/g, "mailto:") // restore the mailto

There's probably a more elegant way to do this but it's working fine for me.

Search Knowledge Base:
Sign up for our newsletter: | Subscribe with RSS: RSS
© ActivSoftware 1999 to 2005 | Privacy Statement