HTML Spacing in CMS

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

By (Deleted User) - August 10, 2009

Where can I change that all pages use this
<p style="margin-top: 0; margin-bottom: 0"></p> as a default setting

Instead of it just being
<p></p>

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