WP Paragraph range
WP Paragraph range ( targetObj ) : Object
Parameter | Type | Description | |
---|---|---|---|
targetObj | Object | → | Range or element |
Function result | Object | ← | Range addressing only paragraphs |
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)