Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris 69 posts 75 karma points
    Feb 09, 2010 @ 16:51
    Chris
    0

    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

     

     

  • dandrayne 1138 posts 2262 karma points
    Feb 09, 2010 @ 17:06
    dandrayne
    0

    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

  • Chris 69 posts 75 karma points
    Feb 09, 2010 @ 20:09
    Chris
    0

    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

     

     

  • dandrayne 1138 posts 2262 karma points
    Feb 09, 2010 @ 20:43
    dandrayne
    0

    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

  • Chris 69 posts 75 karma points
    Feb 10, 2010 @ 11:42
    Chris
    0

    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?

    <config key="cleanup">false</config>

    (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

  • dandrayne 1138 posts 2262 karma points
    Feb 10, 2010 @ 12:01
    dandrayne
    0

    To get rid of htmlTidy as well as modifying your valid elements inside tinymceconfig.config find the following setting in umbracosettings.config

        <!-- clean editor content with use of tidy -->
    <TidyEditorContent>True</TidyEditorContent>

    And change that value to false.

    Dan

  • Chris 69 posts 75 karma points
    Feb 10, 2010 @ 20:08
    Chris
    0

    Hi Dan,

    That's good info! Thanks!

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft