Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-11-16 14:40:28

speterson
Xinha Community Member
Registered: 2005-03-17
Posts: 12

How to remove unwanted <p> tags without going to text editor

We are using Xinha in a CMS that manages snippets of information that are later pulled together in a web page.  Sometimes, we do not want there to be <p> tags in the snippets created by Xinha.  When you first type copy into an Xinha editor, there is no <p> tag and when saved, this paragraph has no surrounding <p> tag. However, when editing and you press an <enter> to start a new paragraph, both the new paragraph and the original paragraph are surrounded by a <p> tag.  Is there anyway to remove the <p> tag from the first paragraph?

I know that this can be done with the text/source editor, but my users need something reaallly simple without seeing any HTML code.  Thanks for any pointers.

Offline

#2 2005-11-17 04:17:31

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: How to remove unwanted <p> tags without going to text editor

Do it server side in your language of choice.  Eg in PHP $cleanContent = preg_replace('/<\\/?p>/i', '', $dirtyContent);


James Sleeman

Offline

Board footer

Powered by FluxBB