Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#556 closed Bug (invalid)

Big problem with img tags and fckeditor2.4.2

Reported by: jean-mat grimaldi Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.4.2
Keywords: Cc:

Description

When inserting an image (or another inline element), the element is inserted inside a paragraph <p><img></p>.

Another (related?) problem : On a new blank page, insert an image, go to the source view and remove the <p> tags, return to wysiwyg view, ... the image has disappeared.

The first problem seems to be related to the new keyboard_entermode config : when changing this mode from "p" to "br" no tag is inserted between img tag, but we can fall on the second problem : (img disappearing)

Change History (4)

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Priority: HighNormal
Resolution: invalid
Status: newclosed

Each problem should have its own ticket, it's easier to track them that way.

The first one is of course related to enter mode as you say. If you want to always have proper <p> when pressing enter, then the editor makes sure that everything is properly nested. If you don't want the <p> around your content then you just have to switch to <br> mode.

The second problem is fixed in the 2.4.3 beta and nightly builds that you could have tested just as it's suggested when reporting bugs.

comment:2 Changed 17 years ago by jean-mat grimaldi

Many thanks for your response.

On the first point, i think this behavior is not correct : when inserting an image we didn't press any key, and we could want <img /> tags displayed as blocks, in that case inserting img inside p tags is bad. This remark could be applied to any kind of tag, (<a>, <span>, etc ...), so perhaps a new feature request ticket could be open : add in fckconfig.js a new option wich give a list of tags we want displayed as blocks.

On the second point i had tested the beta version inline (The nightly build demo is a very good idea !) before posting this ticket, but image insertion was not working, so i'm sorry for duplicate entry ;-).

Bye jean-mat

comment:3 Changed 17 years ago by Alfonso Martínez de Lizarrondo

I think that the easiest solution for the first point is to set

FCKConfig.EnterMode = 'br' ;

that way the content won't be wrapped in a block element and it doesn't matter what the content is. (although you must remember that the user can do other things in the editor that automatically create such block container)

A hint about the second point: if you want to easily test images in the editor but the connector isn't available you can use the smileys. That way you can test it even without a web server.

comment:4 Changed 17 years ago by jean-mat grimaldi

The important thing is that the second problem is resolved with 2.4.3.

if you want to easily test images in the editor but the connector isn't available you can use the smileys. That way you can test it even without a web server.

Of course i played to fast the last time with demo, it was a poor excuse ;-)

The first point can be a talking point. I don't have a final opinion on this and the keyboard behavior option can meet user's requirements in many situations so i think "it's urgent to wait" ...

Bye ;-)

jean-mat

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy