Copied to clipboard

Flag this post as spam?

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


  • Mark Furmanek 2 posts 22 karma points
    Dec 15, 2010 @ 19:41
    Mark Furmanek
    0

    Turning off HTMLTidy in the Rich Text Edior (TinyMCE3)

    I've been tryin to turn off the HTMLTidy validation in TinyMCE3, as per the instructions of dandrayne here:

    http://our.umbraco.org/forum/using/ui-questions/6493-prevent-the-tinymce-editor-from-rewriting-the-html

    in umbracoSetting.config (lines 40-41):

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

    in the tinyMceConfig.config, I've removed all "+" and "-" from before the validElements (with the exception of "strike") to basically allow everything (though, as I understand it, this is probably unnecessary if html validation is turned off)

    <![CDATA[a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
    ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],strong/b[class|style],em/i[class|style],
    -strike[class|style],u[class|style],p[id|style|dir|class|align],ol[class|style],ul[class|style],li[class|style],br,
    img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel],
    sub[style|class],sup[style|class],blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],
    tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
    thead[id|class],tfoot[id|class],td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
    th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],div[id|dir|class|align|style],
    span[class|align],pre[class|align|style],address[class|align|style],h1[id|dir|class|align],h2[id|dir|class|align],
    h3[id|dir|class|align],h4[id|dir|class|align],h5[id|dir|class|align],h6[id|style|dir|class|align],hr[class|style],
    dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[classid|width|height|codebase|*],
    param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button]]>

    I've touched the web.config file by adding a comment at the end of the file and modifying it, saving it  to change the time stamp, and then doing an IIS reset, but all to no avail. TinyMCE3 is still modifying my HTML (most especially removing nested <div> tags, removing ID attributes, among other things.

    I've read something about setting "verify_html" to "false" on the TinyMCE forums website, but I'm unsure of how to do that, or if it is even applicable in Umbraco.

    Am I missing something? Is there something else that needs to be done to turn this feature off? I simply don't want Umbraco rewriting or stripping my code if I edit the HTML.

    Thanks in advance

  • Lloyd 15 posts 35 karma points
    Apr 02, 2012 @ 00:11
    Lloyd
    0

    Did you find an answer to this Mark? I'm having the same issue. Gotta hate tinyMCE sometimes. :)

Please Sign in or register to post replies

Write your reply to:

Draft