WP Paragraph range
WP Paragraph range ( targetObj ) -> Function result
Parameter | Type | Description | |
---|---|---|---|
targetObj | Object | → | Range or element |
Function result | Object | ← | Range addressing only paragraphs |
Compatibility
WP Paragraph range was named WP Create Paragraph range in previous versions of 4D Write Pro. It has been renamed for clarity.
Description
The WP Paragraph range command returns a specific range object that addresses only the paragraphs that intersect with the targetObj you passed as parameter. The paragraph range object returned can be used by WP GET ATTRIBUTES and WP SET ATTRIBUTES to handle paragraph attributes only.
In targetObj, you can pass:
- a range, or
- an element (table / row / paragraph / header / footer / body / section / subsection)
Example
You want to define padding for the paragraphs only:
$oParagraphs:=WP Paragraph range($oSelection)
WP SET ATTRIBUTES($oParagraphs;wk padding;20)