Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Strip <P> from beginning of database content

Posted on 2002-06-24
9
Medium Priority
?
148 Views
Last Modified: 2013-12-24
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?
0
Comment
Question by:jeffmace
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 5

Expert Comment

by:Yog
ID: 7104294
which editor are you using
0
 

Author Comment

by:jeffmace
ID: 7104314
Site Ojects so editor pro
0
 
LVL 17

Accepted Solution

by:
anandkp earned 800 total points
ID: 7106812
hi Jeff,

While diplaying ur text ...

u could try & use the replace function whihc would replace the <p> & </p> tags

replace(x,'<p>',"",'All')
replace(x,'</p>',"",'All')

see if this works & helps u in displaying ur text to ur satisfaction.

let me know

K'Rgds
Anand
0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 5

Expert Comment

by:Yog
ID: 7107745
that may replace all the  <p> within the html codes..
0
 
LVL 17

Expert Comment

by:anandkp
ID: 7107780
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
0
 
LVL 5

Expert Comment

by:Yog
ID: 7107806
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..
0
 
LVL 17

Expert Comment

by:anandkp
ID: 7109669
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
0
 
LVL 17

Expert Comment

by:anandkp
ID: 7174037
Hi Jeffmace,

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

awaiting

K'Rgds
Anand
0
 

Author Comment

by:jeffmace
ID: 7174235
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.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question