We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23478
    • 133 Posts
    Hello

    (Just creating that topic for discussing about FS#604)
    for people not having read it, We are heaving troubles using TinyMCE when document have attributes Tiny doesn’t understand... it simply delete them.
    One good example is the design page given as sample with beta5. just open it with Tiny, save it and the Hide/show command won’t work any more.

    OpenGeek finded the right page ine TinyMCE site for helping us :
    There are options available for TinyMCE to set the allowed elements and attributes. Please see the following for more information...

    http://tinymce.moxiecode.com/tinymce/docs/option_valid_elements.html

    and

    http://tinymce.moxiecode.com/tinymce/docs/option_extended_valid_elements.html

    Very nice wink
    I’m trying to put the "Full XHTML rule set" in tiny, on my test site.
    I’ve finded that I should change the assets/plugins/tinymce/plugin.tinymce.tpl
    ~line 18 I replace the old (very short) line by the code given on site :
    $tinymce_elements = valid_elements : ""
    +"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name"
      +"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev"
      +"|shape<circle?default?poly?rect|style|tabindex|title|target|type],"
    +"abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase"
      +"|height|hspace|id|name|object|style|title|vspace|width],"
    +"area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref"
      +"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup"
      +"|shape<circle?default?poly?rect|style|tabindex|title|target],"
    +"base[href|target],"
    +"basefont[color|face|id|size],"
    +"bdo[class|dir<ltr?rtl|id|lang|style|title],"
    +"big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"blockquote[dir|style|cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
      +"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
      +"|onmouseover|onmouseup|style|title],"
    +"body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink],"
    +"br[class|clear<all?left?none?right|id|style|title],"
    +"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur"
      +"|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type"
      +"|value],"
    +"caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
      +"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
      +"|valign<baseline?bottom?middle?top|width],"
    +"colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl"
      +"|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
      +"|valign<baseline?bottom?middle?top|width],"
    +"dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],"
    +"del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],"
    +"em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"font[class|color|dir<ltr?rtl|face|id|lang|size|style|title],"
    +"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang"
      +"|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit"
      +"|style|title|target],"
    +"frame[class|frameborder|id|longdesc|marginheight|marginwidth|name"
      +"|noresize<noresize|scrolling<auto?no?yes|src|style|title],"
    +"frameset[class|cols|id|onload|onunload|rows|style|title],"
    +"h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"h3[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"head[dir<ltr?rtl|lang|profile],"
    +"hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|size|style|title|width],"
    +"html[dir<ltr?rtl|lang|version],"
    +"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id"
      +"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style"
      +"|title|width],"
    +"img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height"
      +"|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|src|style|title|usemap|vspace|width],"
    +"input[accept|accesskey|align<bottom?left?middle?right?top|alt"
      +"|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang"
      +"|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
      +"|readonly<readonly|size|src|style|tabindex|title"
      +"|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text"
      +"|usemap|value],"
    +"ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"isindex[class|dir<ltr?rtl|id|lang|prompt|style|title],"
    +"kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick"
      +"|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
      +"|onmouseover|onmouseup|style|title],"
    +"legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang"
      +"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type"
      +"|value],"
    +"link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type],"
    +"map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme],"
    +"noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"noscript[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"object[align<bottom?left?middle?right?top|archive|border|class|classid"
      +"|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
      +"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
      +"|vspace|width],"
    +"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|start|style|title|type],"
    +"optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick"
      +"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
      +"|onmouseover|onmouseup|selected<selected|style|title|value],"
    +"p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|style|title],"
    +"param[id|name|type|value|valuetype<DATA?OBJECT?REF],"
    +"pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
      +"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
      +"|onmouseover|onmouseup|style|title|width],"
    +"q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],"
    +"samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"script[charset|defer|language|src|type],"
    +"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name"
      +"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style"
      +"|tabindex|title],"
    +"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title],"
    +"strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"style[dir<ltr?rtl|lang|media|title|type],"
    +"sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title],"
    +"table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class"
      +"|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules"
      +"|style|summary|title|width],"
    +"tbody[align<center?char?justify?left?right|char|class|charoff|dir<ltr?rtl|id"
      +"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
      +"|valign<baseline?bottom?middle?top],"
    +"td[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
      +"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
      +"|style|title|valign<baseline?bottom?middle?top|width],"
    +"textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name"
      +"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
      +"|readonly<readonly|rows|style|tabindex|title],"
    +"tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
      +"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
      +"|valign<baseline?bottom?middle?top],"
    +"th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
      +"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
      +"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
      +"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
      +"|style|title|valign<baseline?bottom?middle?top|width],"
    +"thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
      +"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
      +"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
      +"|valign<baseline?bottom?middle?top],"
    +"title[dir<ltr?rtl|lang],"
    +"tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class"
      +"|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title|valign<baseline?bottom?middle?top],"
    +"tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],"
    +"u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
      +"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title],"
    +"ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
      +"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
      +"|onmouseup|style|title|type],"
    +"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
      +"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
      +"|title]";


    then, I run my test on the design page .... and undecided it doesn’t work
    <h3 style="cursor: pointer;" href="javascript:void(0)" onclick="new Effect.toggle( 'styles' , 'blind');">Liste des styles (<a>Montrer/Cacher</a>)</h3>

    is reduced to
    <h3 style="cursor: pointer">Liste des styles (Montrer/Cacher)</h3>


    * I can understand that the href disappears as it is not in the h3 list of attributes...
    * but the "onclick" is listed, it should remain ! shouldn’t it ?
    * I haven’t seen the rule saying that the empty <a> has to be removed

    What did I make wrong ?
    Is there another line to modify or did I modify the wrong line ? (I do think so has there are several more things that work strange).

    thanks for your help ! (please, do not discuss about the sens of make empty <a> or things like that ... I just want to undestand Tiny in order to give it to my redactors, without having it to DESTROY my work.)
      • 10487 MODX Staff
      • 1,535 Posts
      You’ll have to use the extended_valid_elements property for it to work.
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 23478
        • 133 Posts
        Quote from: garryn at Oct 29, 2006, 06:31 AM

        You’ll have to use the extended_valid_elements property for it to work.
        thanks for your reading and answering !
        That is what I’ve done huh

        In assets/plugins/tinymce/plugin.tinymce.tpl, the property is defined twice :
        extended_valid_elements : "{$tinymce_elements}",

        SO I’ve only defined (line 18) the $tinymce_elements variable (sorry for not having been clear enought)
          • 4018
          • 1,131 Posts
          I’ll add the extended_valid_elements property as a parameter in the plugin code. The only reason I put the valid_elements parameter (and soon the extended_valid_elements parameter) in the plugin code is due to the complexity of the values. So...both of these will be values that you can assign at the top of the code itself. Question though is what the defaults should be. Should every available value be accounted for? Or should the developer of the site be made to alter this parameter to meet any special needs?
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • 25663 MODX Staff
            • 12,272 Posts
            I say give them ever available option, as outlined above. That way we won’t be revisiting this in the future, hopefully. I’m kinda surprised Tiny strips that much stuff out actually by default! smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 23478
              • 133 Posts
              Hello

              Only my opinion : An editor should only add value !

              It is very nice to be able of adding value using a predifined scheme (EG : feeling fields into dialog box)...
              But as a developper, It would not like that a tool delete things I’ve made by hand.

              Quote from: Bravado at Oct 29, 2006, 10:01 AM

              Question though is what the defaults should be. Should every available value be accounted for? Or should the developer of the site be made to alter this parameter to meet any special needs?

              If the editor can’t show what I developped... I can admit.... it’s not fully WYSIWYG ... but it’s because I did something that is going too far. I can explain that to redactor that will feed the site.
              But if an editor deletes job I’ve made by hand.... my only solution is to tell redactors not using that editor despites all the great job it can help them (I do like very much Tiny which is powerfull into MODx context)

              I’ll got further more :
              I some years... when the site will be in production, I may won’t upgrade MODx anymore...
              if one redactor is technician enough , he would like use some new attribute availlable in next HTML version ...
              How much time will he spend
              * trying putting that attribute,
              * inquiring that Tiny deletes it,
              How much time will I spend (If i’m still alive)
              * having to remember where that thing is coded

              sorry for my poor english, but I definitly think an editor should only ADD, never remove code (should it remove, it should ask the redactor each every times it wants to delete)
                • 33372
                • 1,611 Posts
                Quote from: Bravado at Oct 29, 2006, 10:01 AM

                I’ll add the extended_valid_elements property as a parameter in the plugin code. The only reason I put the valid_elements parameter (and soon the extended_valid_elements parameter) in the plugin code is due to the complexity of the values. So...both of these will be values that you can assign at the top of the code itself. Question though is what the defaults should be. Should every available value be accounted for? Or should the developer of the site be made to alter this parameter to meet any special needs?

                I would definitely err on the side of more values rather than fewer (piwaille’s list looks good to me). That way people can code however they like and not be stymied by their RTE. TinyMCE’s method of just stripping anything that isn’t in its valid elements list seems simplistic to me, and it’s sure to cause a lot of confusion and aggravation.

                I always use the XHTML Transitional doctype so that I can still have link targets, ol start numbers, etc. And I like to use javascript events in my tags as well. Then there’s the issue of custom tags (e.g., eFormParse) that are not in fact valid but a lot of us here use.

                I think that TinyMCE should be shipped with an expansive and custom MODx set of valid elements, and perhaps this should be configurable in the admin settings.
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 4018
                  • 1,131 Posts
                  I like the idea of including everything and just removing what is not needed. Makes perfect sense. Now, being that the default values would take up alot of room in the code I plan on putting these values in a separate file and just doing an include for it. Chances are that a typical developer may not need to alter these settings much...but as long as they know they exist and where to go to alter them I think that should be fine. So, with that said, I’ll work on this and get an update uploaded to the repository as soon as possible. laugh

                  Jeff
                    Jeff Whitfield

                    "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                    • 23478
                    • 133 Posts
                    Quote from: Bravado at Oct 30, 2006, 07:38 AM

                    I like the idea of including everything and just removing what is not needed. Makes perfect sense.

                    So, with that said, I’ll work on this and get an update uploaded to the repository as soon as possible.
                    don’t forget to include eform’s attribute for "input" fields and things like that wink
                    (another example why I think RTE should not remove anything)

                    thanks
                      • 4018
                      • 1,131 Posts
                      Also...piwaille, the code you posted below is totally wrong:

                      <h3 style="cursor: pointer;" href="javascript:void(0)" onclick="new Effect.toggle( 'styles' , 'blind');">Liste des styles (<a>Montrer/Cacher</a>)</h3>


                      TinyMCE will likely strip this code because there are alot of parts that don’t meet any valid specification. First, the href attribute doesn’t belong in a h3 tag. Second, your a tag doesn’t have any of the required attributes and thus isn’t valid either. Here’s a better way to do it that will make it completely valid and will keep TinyMCE from stripping it:

                      <h3>Liste des styles (<a style="cursor: pointer;" href="javascript:void(0)" onclick="new Effect.toggle( 'styles' , 'blind');">Montrer/Cacher</a>)</h3>


                      You probably want your cursor style applied to the a tag since from a styling and context point of view that is what makes the most sense.

                      I just tested the above code out on the version of TinyMCE I’m working on that has the proposed changes and it works just fine. It did reorder the attributes for the anchor tag...but it didn’t remove anything though. Looking good so far! smiley

                      More to come on this...
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."