Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » TinyMCE Insert Image

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

Page: 1
Go to End
Author Topic: 4105 Views
  • lx
    Avatar
    Community Member
    82 Posts

    TinyMCE Insert Image Link to this post

    When i insert an image by clicking on the image-icon in tinymce, i can give it a css-class ("Alignment / style").
    So when i choose "On the left, with text wrapping around." it generates the following html-code:

    <div class="image left" style="width: 600px;"><img src="assets/Photos/452344-001.jpg?r=43299" alt="" width="600" height="450" /></div>

    I dont know, why its necessary to have a <div>-tag around the image-tag.

    The problem with this div-Tag is, that it doesnt change when you resize the image by draging with the mouse.

    <div class="image left" style="width: 600px;"><img src="assets/Photos/452344-001.jpg?r=43299" alt="" width="320" height="240" /></div>

    If you compare this with the demo on http://tinymce.moxiecode.com/examples/full.php you see, that the normal tinymce does not
    insert a <div>-tag around the image.

    So, how can i a remove the generated div-tag ?

  • silverseba
    Avatar
    Community Member
    26 Posts

    Re: TinyMCE Insert Image Link to this post

    The Problem was discussed here: http://www.silverstripe.org/general-questions/show/255143
    Seems that you have to edit some javascript code...

  • lx
    Avatar
    Community Member
    82 Posts

    Re: TinyMCE Insert Image Link to this post

    thanks! that is what i was looking for.

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