Purpose

Wrap Paragraph and Move Cursor to Next or Previous.

Operation

This function issues a CodeWright WrapParagraph
command that wraps the text in a column delimited on the left by
the first character of the paragraph and on the right by the
right margin. The function then moves the cursor to the first
character of the next paragraph (either up[ or down).

Our corporate standard for ASP and HTML is to separate
paragraphs with a single blank line. This results in code that
looks something like ...

&ltp&gtThis function moves the cursor to the first character
of a line of a block of information.

&ltp&gtThis function also invites further exploration to
determine its full potential.

We replace the WrapParagraph binding to the wrap
button with tlaWrapPara. This allows us to position
anywhere in an ASP or HTML file, repeatedly hit the button and
step our way through the document determining at each paragraph
if we wish to wrap it or skip to the next paragraph.

Example

Default - wrap current paragraph and move cursor down
to first character of next paragraph.

tlaWrapPara( );

Specified - wrap current paragraph and move cursor up
to first character of previous paragraph.

tlaWrapPara( "up" );

Input Parameters

Parm

Name

Code

Meaning

1

Direction

Wrap current paragraphs and move cursor down.

"down"

Wrap current paragraphs and move cursor down.

"up"

Wrap current paragraphs and move cursor up.

Return Codes

Code

Message/Meaning

-1

tlaMovePara: Direction (parm 1) not null, "down", or "up".

0

No match found.

1

Match found.

The tlaMovPara reference is correct. The only
message issued is indeed issued from tlaMovePara.

Reference

This function calls tlaError, tlaMovePara,
and tlaSkip.

Compatibility

Current version verified under:

CodeWright 7.0b

CodeWright 7.0c

CodeWright 7.5.1

CodeWright 7.5.2

CodeWright for .NET 7.0

CodeWright for .NET Restriction

None.

Installation

There are three primary methods for installing this macro on
your system. Method A uses the tlaMDE tool available
for purchase from this website. Method B manipulates the macro
repository directly. Method C uses the API Macro... tool
provided in every copy of CodeWright (but not CodeWright for
.NET).