Link to home
Start Free TrialLog in
Avatar of jeffmace
jeffmace

asked on

Strip <P> from beginning of database content

My WYSIWYG editor place <P> ass the first thing in the database.  This becomes a problem when trying to display the content due to it adding a double space in my page.

Example:

Title:
By:
Date:

Content:

This would be great if it was exactly what i was trying to do, but i don't want the gap to be there between date and content due to the paragraph tag...  is there a way to just show the natural text without showing the html for the <p> tag?
Avatar of Yog
Yog

which editor are you using
Avatar of jeffmace

ASKER

Site Ojects so editor pro
ASKER CERTIFIED SOLUTION
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
that may replace all the  <p> within the html codes..
Hi Again,

Inthat case - [considering what yog has written]

what u could do is use the listfirst & listlast functions

use listfirst to get the first <p> tag & replace it with ""

& then use the listlast to get the last </p> & replace that with "".

i think this should solve - right YOG !!!

K'Rgds
Anand
i am not sure, coz if the user enters twice in the editor, it wil put up 2 <p> </p> <p> </p> tags, i guess there should be a way to do this in the editor itself rather than code, can you post this in soeditor forum..
Hi there

NO I DONT THINK SO !

cos form what Jeff has written - he wants the first <p> tag to be scraped off - as this is added while inserting in the DB.

so whatever the editor does - is for the what & how the user wants it to be - the only problem is the automatic addition of <p> tag in the beginning - whihc displays a extra space.

So i think this should work - cos if u think the editor is the problem - then the user can do N number of things & u can never keep a track of it.

I hope this is how it is ...
let me know !!!

K'Rgds
Anand
Hi Jeffmace,

would u comment on this one - please !!!
cos u have kept a lot of Q's waiting ...

awaiting

K'Rgds
Anand
This would work.  What I did find though was that the SiteObjects SoEditor does have an option for Single Spacing instead of Double..  So actually I made some changes on my site but this did work.