Jump to:

520 Posts in 248 Topics by 263 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » tiny mce image edit problem

Forum for content editors and CMS users.

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

Page: 1 2
Go to End
Author Topic: 4272 Views
  • mattman
    Avatar
    Community Member
    18 Posts

    tiny mce image edit problem Link to this post

    Hi

    I am trying to replace the code:

    img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|name]

    with

    img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style]

    hoping to get the image positioning to work for my client - and cannot find out where to do this as there is no tinymce config file to edit??

    IMAGE EDITING IS CURRENTLY COMPLETELY DISFUNCTIONAL which is a major PROBLEM - it does not remember / publish horizontal, vertical space and border when right click edited and the alignment options do not match the insert options which I can edit through the typography.css, which means I have to delete the picture and reinsert. My clients cannot edit the site easily which is a major concern!!!

    I have searched for hours and cannot find a solution. PLLLLLLLLLLLLLLS HEEEEEEEEEEEEEELP this is urgent.

    MANY THANKS!!!

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: tiny mce image edit problem Link to this post

    Its defined in the cms/_config.php file under the 'extended_valid_elements' option in HtmlEditorConfig settings. If you want to customize the valid elements you'll probably want to do so from your own code rather than editing core http://doc.silverstripe.org/doku.php?id=htmleditorconfig

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: tiny mce image edit problem Link to this post

    Hi Willr

    Thanks so much for responding - I had a look at this and cannot figure out how the required code fits into the setOption(’optionname’, ‘value’) ? - I am very new to Silverstripe.

    Any assistance would be greatly appreciated as the deadline is tomorrow!

    Many thanks again

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: tiny mce image edit problem Link to this post

    In your mysite/_config file add

    HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap|style],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]");

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: tiny mce image edit problem Link to this post

    Thanks a MILLION Willr - unfortunately the end of your code got cut off - can you please resend??

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: tiny mce image edit problem Link to this post

    Please dont waste your time I figured it out - THANKS AGAIN!

    HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap|style],iframe[src|n");

  • mattman
    Avatar
    Community Member
    18 Posts

    Re: tiny mce image edit problem Link to this post

    HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|
    usemap|style],iframe[src|n");

  • Tomae
    Avatar
    Community Member
    14 Posts

    Re: tiny mce image edit problem Link to this post

    Hi all... I want to have "onmouseover" & "onmouseout" functionality for "<a>" tags .... I tried this way

    HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "a[id|class|style|href|onmouseout|onmouseover],script[type|src],img[id|class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]");

    but again tinyMCE strips out my code.....

    Pls help me to figure out the problem.....

    Thanks

    4272 Views
Page: 1 2
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.