Hi

Since a few time ago, very often, after I resize an image in the editor, when I save the post, the new size of the image is lost. Only after I try it several times it saves the new size.

Example:

This is the code before I save it:

Only local images are allowed.

This is the code after I save it:

Only local images are allowed.

Any idea about the problem.

Regards

Comments

dgarciad’s picture

Sorry. Filter HTML removed the code.

Let's try again

I have noticed that the problem happens when I resize the image using the mouse in the editor. When I change the size in the image properties window, it works fine.

If I resize the image using the mouse, the HTML code changes from:

<img height="190" alt="" hspace="3" width="136" align="left" vspace="3" src="/observatorios/sites/default/files/image/airforce.JPG" />

to this:

<img alt="" hspace="3" align="left" vspace="3" style="width: 148px; height: 204px" src="/observatorios/sites/default/files/image/airforce.JPG" />

and after I save it, it changes to:

<img alt="" hspace="3" align="left" vspace="3" src="/observatorios/sites/default/files/image/airforce.JPG" />

Any idea why this "style" tag is removed?

Does it have to do with "Filtered HTML"? How could it be solved?

Regards

Jorrit’s picture

Yes, it could be a filter. In what field are you editing?

dgarciad’s picture

Hi

In what field are you editing?

I am sorry but I am not quite sure if I understand your question. I am editing the body content of the post using the fckeditor.

The <img> tag is one of the HTML tags allowed.

Regards

Jorrit’s picture

Category: bug » support

The <img> tag may be allowed, but the style attribute might be filtered out. Try to change the filter settings and the FCKeditor security filter settings.

jasonabc’s picture

@dgarciad - I was getting the exact same issue but solved it by right-clicking on the newly resized image in the FCKEditor window, selecting "Image Properties" and then clicking the little "lock ratio" padlock icon. That seemed to lock the image down to the new size dimensions so when you save out the size is preserved. Not sure how well documented this feature is as I haven't seen anything and was literally blind luck that I tried clicking the padlock icon and found that it worked.

dgarciad’s picture

Thanks for your answer, jasonabc

I knew that modifying the image size using the properties window works fine. Nevertheless people is used to adapt the image size directly in the editor so that caused me a lot of problems.

Nevertheless, I have solved the issue using a different approach.

I have set "Full HTML" as default format. Initially I did not like this option because people usually copy and paste information in the editor coming from differente sources and very often the presentation (font type and size) varied between posts. However, I have force the option "Paste as text" in the editor, which filters all the HTML code. This way, I avoid troubles.

Thanks

Jorrit’s picture

Status: Active » Closed (fixed)