Find & Replace Line Breaks with Paragraph Breaks

J

Jeremy

I would like to change line breaks to paragraph breaks in FP 2003. In Word I
would seach for ^l and replace it with ^p. This doesn't work in FP.

How can I seach for line breaks and paragraph breaks please? Many thanks!
 
T

Thomas A. Rowe

Try <br> Line Break tag or <p> and </p> Paragraph tags

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Steve Easton

It's not that simple, because in html a line break is only one item <br> while
a paragraph has an opening and a closing tag <p> </p>
The find and replace function would not know where to place the closing </p> tag
because there would be nothing to search for to replace it with.

You might want to take a look at Code view. It's pretty handy.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
P

Paul S. Wolf

Steve said:
It's not that simple, because in html a line break is only one item <br> while
a paragraph has an opening and a closing tag <p> </p>
The find and replace function would not know where to place the closing </p> tag
because there would be nothing to search for to replace it with.

You might want to take a look at Code view. It's pretty handy.

To replace line breaks with paragraphs, you would replace <br> tags with
BOTH </p><p> tags. (i.e. replace the line break with "end the current
paragraph and start a new paragraph") (<br> in html is the equivalent
of ^l in Word, and </p><p> is the equivalent of ^p)
 
J

Jeremy

Sounds like the easiest way is to copy the text out to Word, change the line
breaks to paragraphs, then copy the text back into FP.

Many thanks Steve and Thomas for your quick replies!
 
S

Steve Easton

That would work with the exception of the first opening <p> tag and the last
closing </p> tag.
As long as the user remembered to manually insert them it would work, if not I
see a problem.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
P

Paul S. Wolf

That would work with the exception of the first opening <p> tag and the last
closing </p> tag.
As long as the user remembered to manually insert them it would work, if not I
see a problem.
But wouldn't there normally be an opening <p> before the first <br> and
a closing </p> after the last <br> already?
 
S

Steve Easton

Correct, which would leave a set of unused <p></p> tags where the first <br>
was replaced
and an unused opening <p> tag when the last <br> was replaced.



--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Stefan B Rusynko

Technically speaking the closing </p> tag is optional in Html spec (not in XHtml) and can be omitted
- so replacing <br> w/ <p> should work in most browsers
(admittedly ugly and not the recommended coding long term approach)
See http://www.w3.org/TR/html4/struct/text.html#edef-P

--




| Correct, which would leave a set of unused <p></p> tags where the first <br>
| was replaced
| and an unused opening <p> tag when the last <br> was replaced.
|
|
|
| --
| Steve Easton
| Microsoft MVP FrontPage
| 95isalive
| This site is best viewed..................
| ..............................with a computer
|
| | > On 5/17/2004 4:21 PM, Steve Easton wrote:
| >
| > > That would work with the exception of the first opening <p> tag and the
| last
| > > closing </p> tag.
| > > As long as the user remembered to manually insert them it would work, if not
| I
| > > see a problem.
| > >
| > >
| > But wouldn't there normally be an opening <p> before the first <br> and
| > a closing </p> after the last <br> already?
| >
| > --
| > Paul S. Wolf, P.E. mailto:p[email protected]
| > Past President, Great Lakes Region, Federation of Jewish Men's Clubs
|
|
 
P

Paul S. Wolf

Steve said:
Correct, which would leave a set of unused <p></p> tags where the first <br>
was replaced
and an unused opening <p> tag when the last <br> was replaced.

But look back at my original suggestion. It was to replace <br> with
</p><p>. i.e. insert a CLOSING tag followed by a new opening tag.

so

<p> text <br>
more text </p>
<p> still more text <br>
even more text </p>

would become

<p> text </p><p>
more text </p>
<p> still more text </p><p>
even more text </p>

And FP would probably rearrange that to:

<p> text </p>
<p> more text </p>
<p> still more text </p>
<p> even more text </p>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top