Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By squidz on
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
=-=
If the line break filter enabled on the input format you are using to submit the content?
not understanding
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?
=-=
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.line break
I'll try it. I'm not yet sure how to disable the line break for only that type. Thanks for the input.
=-=
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.
Thanks! This worked perfectly
Thanks! This worked perfectly as was surprisingly simple.
Same problem
I've got the same problem. I've tried disabling FCKEditor and writing the following:
but when I save the page I see this in the source:
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?
Oops
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.