Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Can wysiwyg editor be modified to allow all tags?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 3744 Views
  • Possibles
    Avatar
    Community Member
    16 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    Hello

    I have the kind of same problem : I need to be able to use this code

    <embed src="sample.mov" width="320" height="256"></embed>


    to be able to show quictktime movie in page.

    So I tried to use the technqiue you're talking about and added embed[type|width|height|src|*] to the list of elements in _config.php:

    The code looks now like this but even after dev/build it doesn't work and turns my <embed> tag into <object>

    HtmlEditorConfig::get('cms')->setOption('valid_elements', "@[id|class|style|title],#a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],
    embed[type|width|height|src|*],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align|style],-ol[class],
    -ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],#td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align],address[class|align],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|dir|class|align|style],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],@[id,style,class]");

    Any idea why ? Maybe it oesn't work with all tags ?

    T

  • x75
    Avatar
    Community Member
    42 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    Just a guess: Try putting a space before the closing </embed> Tag. I know iframe Tags cause trouble without that. maybe this is the same problem.

    Johannes

  • Possibles
    Avatar
    Community Member
    16 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    Hello thanks

    I just tried your suggestion

    <embed src="sound.mov" width="216" height="16"> </embed>

    I even tried this

    HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');

    But no luck. I don't get it ???

    Maybe I misunderstood something

    Thanks

  • x75
    Avatar
    Community Member
    42 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    hm, ok.

    What exactly is the problem you have?

    Is the embed Tag removed from the HTMLText once you save it, or does it get messed up, or what happens?

  • Possibles
    Avatar
    Community Member
    16 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    Hello

    Well this : <embed src="sample.mov" width="320" height="256"> </embed>

    Turn into this

    <p>
    <object width="320" height="256" data="sample.mov" type="application/x-shockwave-flash">
    <param name="src" value="sample.mov" />
    </object>
    </p>

    Thank you

  • x75
    Avatar
    Community Member
    42 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    have a look at http://www.tinymce.com/forum/viewtopic.php?id=23773

    that might be your problem.

  • Possibles
    Avatar
    Community Member
    16 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    Thanks

    It seems that it could be it .

    My problem is to find where I can find the string 'media_strict : false' to change it

    I searched SS forum with that string it but nothing came up

    Do you know if there is some js file with that setting somewhere ?

    Thanks

  • x75
    Avatar
    Community Member
    42 Posts

    Re: Can wysiwyg editor be modified to allow all tags? Link to this post

    I would guess you just need to add it as a new option:

    HtmlEditorConfig::get('cms')->setOption('media_strict', 'false');

    3744 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.