Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Opened
sales@elliecomputing.com - Contact us


TextDocument.Selection object

 

 

Prototype for TextDocument.Selection objects. Is a kind of Document.Selection.

Syntax

You can create a selection of a whole text document content this way (in this case, the content of the left side):

var selection = new TextDocument.Selection (my_doc.contents.left);

You can create a partial selection of a text document content this way:

var selection = new TextDocument.Selection (my_doc.contents.left, LinearRange (start, length));

Parameters

content. TextDocument.Content object. Content to be selected.
range. LinearRange object. Range of content to be selected. If the value for this parameter is omitted, the whole content is selected.

Property Of

TextDocument object.

Implemented In

ECMerge 2.1

Description

TextDocument.Selection object defines a portion of text within a given content (and as such a given side/role for the comparison). Selections are used in several places to edit and retrieve text.

Properties

Property Description
range LinearRange object. Range of text contained by the selection.

 

Methods

 none specific.

Examples

Example 1.

Obtaining the text of the current selection in current view:

var sel = current_frame.coordinator.current_view.clone_selection();
alert ( "The text in the selection is:" + current_frame.coordinator.document.content[current_frame.coordinator.current_view.role].get_text(sel) );

See Also 

Document.Selection object, TextDocument.Content object,  TextDocument.View object.