HTML Spacing in CMS

3 posts by 3 authors in: Forums > CMS Builder
Last Post: August 11, 2009   (RSS)

Re: [hegadmin] HTML Spacing in CMS

hegadmin: I found this interesting gem in "The CMS Builder Cookbook" by GKornbluth. If you know some Unix, you should be able to adapt it.

REMOVING THE <P> TAGS INSERTED BY THE TINYMCE EDITOR
CMSB uses the TinyMCE WYSIWYG editor and therefore is pretty much stuck with the concepts that it
uses.
If using a textbox or a text field won’t work for you and you’re using the WYSIWYG, here’s an idea that
Dave at Interactive tools came up with in response to the issue.
<!-- remove leading <p>, do this _before_ displaying field value -->
<?PHP $record['yourfieldname'] = preg_replace("/^\s*<p>/i", "", $record['yourfieldname'] ); ?>

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] HTML Spacing in CMS

By Chris - August 11, 2009

Hi hegadmin,

You can use CSS to change global styles like that. Add a stylesheet to all of your pages with the following CSS:

P {
margin-top: 0;
margin-bottom: 0;
}


Does that answer your question?
All the best,
Chris