I have a div container and I call it "content_container". This container is able to drag and resize using jQuery UI . Inside this container, I implemented TinyMCE (text content editor). My problem:
If the user inserts an image with a resolution of 2000 pixels and a resolution of 2000 pixels, the maximum width of the container is 1000 pixels. Then it will look like this:
____________________
| Container header |
----------------------
| text [image...................image]
| [image...................image]
|____________________|
(I’m sorry, I’m still developing it on my local host and have not yet found a web host, so I can’t give you a direct link to the demo).
Well, the container can still be resized, that's right, the image size is always 2000 pixels × 2000 pixels. My question is: is it possible, when I resized the "content_container", the image will automatically resize and fit the width of the container?
If so, how to do it?
If not, is there another solution for this?
The code
Prior to TinyMCE container code:
<div id="content_container">
<div id="header">The header</div>
<div id="content">
<div id="inlineEditor"></div>
</div>
</div>
After the user enters the content (for example, insert an image), the container will become:
<div id="content_container">
<div id="header">The header</div>
<div id="content">
<div class="inlineEditor">
<p>some text <img alt="test" src="../usrXX/img/imgname.jpg"></p>
</div>
</div>
</div>
As you can see, I can only manipulate the inlineEditor class.