|
TextDocument.View object
Prototype for TextDocument.View objects. Is a kind of View object. SyntaxYou cannot create View object directly. Views are created as necessary when DocumentFrame objects are created for a document.
var my_doc;
Parametersnone. Property Ofnone. Implemented InECMerge 2.1 DescriptionTextDocument.View objects let you navigate by character position, obtain the selection or set it. Propertiesnone specific. Methods
clone_selection
ExamplesExample 1.Set the selection on current view to the whole content. current_frame.coordinator.current_view.set_selection (new TextDocument.Selection (current_frame.coordinator.document.content.left); See Also
Method clone_selectionSyntaxfunction clone_selection ( )
Parametersnone. Method OfTextDocument.View object Implemented InECMerge 2.1 DescriptionReturns a new selection object which contains the same characters as those selected in the view. ExamplesExample 1.Retrieves the selection of the current view: current_frame.coordinator.current_view.clone_selection(); See Also
Method navigateSyntaxfunction navigate (position) Parametersposition. Integer. Character position in the given view Method OfTextDocument.View object Implemented InECMerge 2.1 DescriptionSet the cursor position to the given position, and ensures that it is visible in the view. ExamplesExample 1.Navigate to the start of 10 th line:
var current_doc = current_frame.coordinator.document;
See Also
Method set_selectionSyntaxfunction set_selection (selection) Parametersselection. TextDocument.Selection object. Selection to set on the view Method OfTextDocument.View object Implemented InECMerge 2.1 DescriptionSelects in the view exactly the same characters as those included in selection. ExamplesExample 1.Builds a selection containing all the text of the , then set it on the view (actually selecting all items):
var current_doc = current_frame.coordinator.document;
See Also
|
|