Forum closed. New forum available at

Inserting a img without it being encased in a p?

Support forum for WYMeditor.

Inserting a img without it being encased in a p?

Postby timbe on Wed Oct 29, 2008 6:07 pm

Is it possible to insert the image without encasing it in a paragraph container?

I'd like to customize the popups to insert to where it give a left or right option:

Example without brackets:

Popup on insert image, enters in foo, selects from drop down "left"

Markup is changed to:

img src='foo' class='float-left'/
p this is a paragraph /p

instead of

p img src='foo' class='float-left'/ this is a paragraph /p

Posts: 1
Joined: Wed Oct 29, 2008 5:58 pm

Re: Inserting a img without it being encased in a p?

Postby mr_lundis on Mon Nov 03, 2008 6:22 pm

Hi timbe!

Images get encased inside paragraphs because the img element is an inline element, thus it needs to be contained inside a block element (such as a paragraph or a division), otherwise the code won't validate. Now you might say that when you presents your content it's already contained inside a block element, but the editor isn't aware of that.

And regarding the image alignment, that's a design concern. Therefore such functionality isn't available by default, as the primary focus of WYMeditor is the content itself not the presentation of it. However one could argue that if WYMeditor is ever to reach a broader audience more design related features might need to be included, witch then can be enabled or disabled as needed.

I hope I've given you a somewhat satisfying answer, cheers mate!
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest