auto-wrap all paragraphs in <p> tags

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

auto-wrap all paragraphs in <p> tags

Postby ChipW » Fri Jun 18, 2021 5:31 pm

Is there a way, maybe via a script, to wrap all paragraphs of text inside <p></p> tags?

As it is now, I have to manually insert <p> </p> for every paragraph in text that is pasted into the editor, and that can be quite tedious and time-consuming. There typically 10 - 20 pages of text.

The text comes from a basic text editor and has a blank line between each paragraph. The editor uses the <enter> key for paragraphs, so I assume it is simply a CR/LF, right?

Example -->

Some paragraph1 text. Some paragraph1 text. Some paragraph1 text. Some paragraph1 text.

Some paragraph2 text. Some paragraph2 text. Some paragraph2 text. Some paragraph2 text.

Some paragraph3 text. Some paragraph3 text. Some paragraph3 text. Some paragraph3 text.
ChipW
 
Posts: 4
Joined: Tue Jun 01, 2021 6:56 pm

Re: auto-wrap all paragraphs in <p> tags

Postby pmk65 » Wed Aug 11, 2021 1:40 pm

Use Search/Replace with regular expressions. Then you can replace the beginning/end of line with paragraph tags.
Or write a plugin that does the same thing.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: auto-wrap all paragraphs in <p> tags

Postby davidhelp » Sun Sep 19, 2021 8:08 am

I highlight the text and then inserted a paragraph tag either use the toolbar with the symbol of Paragraph or Insert> Paragraph
You can also highlight any portion of the text and the <p> and </p> will wrap the text.
For a <br> I place the cursor where I want it then click on the toolbar button: br

<p>Example -->

Some paragraph1 text. Some paragraph1 text. Some paragraph1 text. Some paragraph1 text.
<br>
Some paragraph2 text. Some paragraph2 text. Some paragraph2 text. Some paragraph2 text.
<br>
Some paragraph3 text. Some paragraph3 text. Some paragraph3 text. Some paragraph3 text.</p>
davidhelp
 
Posts: 27
Joined: Thu Jul 15, 2021 6:04 am


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 16 guests