Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

TinyMCE Insert Image


Reply


3 Posts   4243 Views

Avatar
lx

Community Member, 83 Posts

16 April 2009 at 1:26am

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 ?

Avatar
silverseba

Community Member, 26 Posts

16 April 2009 at 2:41am

Edited: 16/04/2009 2:41am

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

Avatar
lx

Community Member, 83 Posts

16 April 2009 at 4:42am

thanks! that is what i was looking for.