I have two Blocks that will create two spots for banner photos to live in a custom template. However, it an image is inserted in either FCK or TinyMCE or even as code in the Body Block field, a

tag is wrapped around the image, creating an unwanted space above it.

So, it looks like THIS

Instead of THIS

Is there a way to add the images to these Blocks without the pesky

??

Should I be setting these manageable images up some other way?

Comments

VM’s picture

If the line break filter enabled on the input format you are using to submit the content?

squidz’s picture

I'm not sure if you're asking me a question or telling me to disable line break. If I do disable it, how will that affect input of regular text content elsewhere?

VM’s picture

create a new input format, specifically for use with what you are doing, and do not enable the line break.

ie: create a block images input format and use this input format when necessary or create a content input format for use. Either way. if you want the <p> tags to be removed you need to use an input format that does not have the line break enabled.

squidz’s picture

I'll try it. I'm not yet sure how to disable the line break for only that type. Thanks for the input.

VM’s picture

go to administer -> input formats
click on the add input format tab

there you will see a list of filters you can enable or disable.

squidz’s picture

Thanks! This worked perfectly as was surprisingly simple.

beasley’s picture

I've got the same problem. I've tried disabling FCKEditor and writing the following:

<div>
<img width="63" height="63" alt="Library books" src="[url]" />
<h2>A title</h2>
<p>A paragraph</p>
</div>

but when I save the page I see this in the source:

<div>
<img width="63" height="63" alt="Library books" src="[url]" /></p>
<h2>A title</h2>
<p>A paragraph</p>
</div>

i.e. an end paragraph tag on the img tag, without a start paragraph tag!

I've made my own input filter with all filters switched off, to no avail. I've used different browsers and cleared the cache of the site but that doesn't work either. I don't know where this stray tag is coming from. When I go to edit the code it's not there. If I close the space between the img tag and the h2 I get a break tag instead at the end of the image. Anyone got any ideas what's happening?

beasley’s picture

I switched to Full HTML and turned the Line break filter off and all was fine. Still not sure why my own input format didn't work, or why I got and end paragraph tag only.