Changing blanks to paragraphs when pasting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I paste text the blank lines are showing up as those two down pointing
arrows instead of paragraph marks, that you get by hitting Shift-Enter -
which means FP recognizes the entire paste as one paragraph. I want to
convert all the blank lines to double paragraph marks so I can format each
one independently, such a for headers - but I can't seem to do it except
very tedious manual replacement. U tried search and replace using regular
expressions, but nothing seems to work, although I may have the symbol for
downpointing arrows wrong. I know para is \n

Jim
 
When pasting from Notepad to FrontPage text is normally pasted as one
paragraph with line breaks creating new lines.
In FrontPage 2003, and probably other versions, with the page open in Design
(Normal) view, use Edit->Paste Special and choose Normal Paragraphs from
the list of options.
The text will be pasted as paragraphs, with no line breaks.

In an HTML page, paragraphs are text contained in <p>..</p> tags, as in
<p>...some paragraph text...</p>
there may not be an actual carriage return, but the browser will render the
paragraph as though there were. The browser renders carriage returns as
spaces, so these are not visible when the page is displayed.
Line breaks (the two down pointing arrows) are rendered with <br> tags, as
in

here is some text<br>This text appears to be on the next line.

Again, notice the lack of carriage returns.

To convert text with line breaks to paragraphs do a search and replace in
FrontPage, in HTML or Code view, Search for <br> and replace it with
</p><p>
The first and last line *may* have to be manually corrected - <p> added to
the first line, and the last <p> removed, though when pasting text from
Notepad these may already be correct.
 
Okay, that worked, kind of. I wanted to replace multiple adjacent <br>s with
One <p> mark in Code View using regular expressions, and tried this:

Find: (<br>)+ Replace with: <p></p>

The problem is, I got as many consecutive <p>s as breaks. Five breaks made
five paragraph marks. They only shows up as one line on the browser of
course, but it does bloat the code. I'm certain the + should mean any number
of occurrences of the <br> should be replaced with One para. Am I doing this
wrong or is this an FP bug?
 
Probably No to both questions - it's the data that's wrong :)

Find and replace (<br>)+ will find 1 or more <br> sequences and replace
all found *provided* the sequences are not split by any other character,
such as a carriage return.
So <br><br><br> would be replaced by </p><p>
whereas
<br>
<br>
<br>
would be replaced by
</p><p>
</p><p>
</p><p>

Here I would search for <p>\n</p> and replace with nothing.
 

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

Back
Top