Is there a way to manipulate tinyMCE's html rendering?
My client wants to use a link generator for his email address to avoid spam. (He uses http://www.wbwip.com/wbw/emailencoder.html.) But once the char encoded string is entered in the richtext editor and he clicks on publish, tinyMCE reverts the process, outputting the email address again.
I'm looking for a flexible solution, with the possibility to turn on/off tinyMCE's cleanup function when needed.
Should also note that I think I remember seeing some pieces questioning the effectiveness of encoding technique to stop all but the most basic of email harvesters.
Thanks for that link. I checked it out, but it seems like a quite complicated technique... (It also doesnt support email adresses embedded in richttext editors.)
I was thinking about a broader approach...Since sometimes i also don't want tinyMCE to add or remove markup from my richtextbox's content. (For example, tinyMCE removes empty div's as well or adds <p> elements where i dont want them.)
I'm browsing the tinyMCE website now to see what's possible...
Ah, you'd probably need to write an xslt extension to parse your rich editor field for email addresses before passing them to your enconding function. It would make a great package!
tinyMCE and html rendering
Hi,
Is there a way to manipulate tinyMCE's html rendering?
My client wants to use a link generator for his email address to avoid spam. (He uses http://www.wbwip.com/wbw/emailencoder.html.) But once the char encoded string is entered in the richtext editor and he clicks on publish, tinyMCE reverts the process, outputting the email address again.
I'm looking for a flexible solution, with the possibility to turn on/off tinyMCE's cleanup function when needed.
Thanks,
Chris
Hows about something external from tinyMCE, in a "set and forget" way? This seems to be the approach that Thomas Kahn used at http://umbraco.blogspot.com/2008/06/cloaking-email-addresses-in-umbraco.html. ; Perhaps it will help?
Should also note that I think I remember seeing some pieces questioning the effectiveness of encoding technique to stop all but the most basic of email harvesters.
Dan
Hi Dan,
Thanks for that link. I checked it out, but it seems like a quite complicated technique... (It also doesnt support email adresses embedded in richttext editors.)
I was thinking about a broader approach...Since sometimes i also don't want tinyMCE to add or remove markup from my richtextbox's content. (For example, tinyMCE removes empty div's as well or adds <p> elements where i dont want them.)
I'm browsing the tinyMCE website now to see what's possible...
Thanks again!
Chris
Ah, you'd probably need to write an xslt extension to parse your rich editor field for email addresses before passing them to your enconding function. It would make a great package!
With regards to removing empty divs etc, you can change the settings in tinymcesettings.config inside the config folder according to http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
Dan
Thanks for pointing me to that config file, Dan! I was searching for something like that in the tinymce3 subfolder. :)
If i understand right, it would be possible to add something like this to the <customConfig> section?
(I know this is not recommended for the regular user. But my client is a software developer himself.)
Yes, an email filter (and spam protection) for richtext content, would be a useful package. I'll give it a try one of these days.
best wishes,
Chris
To get rid of htmlTidy as well as modifying your valid elements inside tinymceconfig.config find the following setting in umbracosettings.config
And change that value to false.
Dan
Hi Dan,
That's good info! Thanks!
Chris
is working on a reply...