LogoLogo
Version 4
Version 4
  • Version 4
  • Welcome to Flying Logic 4
  • πŸ“–Flying Logic Resources
  • Recommended Reading
  • Flying Logic 4 User Guide
    • 🏁Getting Started
    • πŸš€What's New
    • πŸ—žοΈSubscribing
    • πŸ“–Reader Mode
    • πŸ“„The Document Window
    • β˜‘οΈConstructing Graphs
    • πŸ€–Graph Logic
    • πŸ“¦Domains
    • βŒ›Chart View
    • πŸ’»Scripting
    • πŸ’‘Menus
    • ⌨️Keyboard Shortcuts
    • ❓Preferences
    • πŸ‘”Project Management
  • Flying Logic 4 Scripting Guide
    • 🏁Getting Started
    • Online Resources
    • Predefined Variables
    • Classes
      • Application
      • CalendarEvent
      • Color
      • Date
      • Document
      • Domain
      • Edge
      • EntityClass
      • Entity
      • FontSpec
      • GraphElemFilter
      • GraphElem
      • GraphOperator
      • Group
      • Junctor
      • LayoutLine
      • Resource
      • Symbol
      • TextEditor
      • Time
      • VertexElem
      • VertexOperator
      • Workweek
    • πŸ‘‰Constants
    • Graphic Symbol Names
    • πŸ“—Importer and Exporter Examples
    • Flying Logic Document Format
  • Thinking with Flying Logic
    • Part I: Introduction
    • About This Book
    • Keys to Great Thinking
    • Part II: The Theory of Constraints Thinking Processes
    • Overview of the Theory of Constraints
    • The Categories of Legitimate Reservation
    • Current Reality Tree
    • Evaporating Cloud: Conflict Resolution
    • Future Reality Tree
    • Prerequisite Tree
    • Transition Tree
    • Strategy & Tactics Tree
    • Part III: Other Techniques
    • Evidence-Based Analysis
    • Concept Maps
Powered by GitBook
On this page
  • Fields
  • Methods
  1. Flying Logic 4 Scripting Guide
  2. Classes

TextEditor

PreviousSymbolNextTime

Last updated 4 months ago

Annotations can be edited via a TextEditor instance instead of having to modify the annotation as a string value, which can be difficult as an annotation is in HTML format. A TextEditor for an annotation is provided via the method annotationEditor.

Fields

Field

Type

Description

length

integer

Read only. Length of the β€œplain” text.

text

string

Read only. The styled text as an HTML document.

plainText

string

Read only. The plain text; i.e., the same as text above but with all HTML tags removed.

selection

string

Read only. The currently selected text as plain text.

selectionStart

integer

The start of the selection.

selectionEnd

integer

The end of the selection, always greater than selectionStart.

selectionAttributes

dictionary

Methods

flush( )

Saves all changes to the text, possibly creating an undo record.

replace( string, attributes )

Replaces the text between selectionStart and selectionEnd with string, assigning the given attributes dictionary to the new text, and sets selectionEnd to selectionStart plus the length of string (see the Text Editor Type in Application class for possible attributes keys and values).

insert( string, attributes )

Inserts string at selectionStart, assigning the given attributes dictionary to the new text, and sets selectionEnd to selectionStart plus the length of string (see the Text Editor Type in Application class for possible attributes keys and values).

remove( )

Deletes the text between selectionStart and selectionEnd and sets selectionEnd to selectionStart.

runStart( )

Searching backwards, finds the first character not matching the attributes at selectionStart starting at selectionStart and returns the index of the next character (as an integer) or zero if the start of the text is reached.

runStart( attributes )

Searching backwards, finds the first character not matching the given attributes starting at selectionStart and returns the index of the next character (as an integer) or zero if the start of the text is reached.

runLimit( )

Searching forward, finds the first character not matching the attributes at selectionStart starting at selectionStart, and returns the index of that character minus the result of calling runStart( ), as an integer.

runStart( attributes )

Searching backwards, finds the first character not matching the given attributes starting at selectionStart, and returns the index of that character minus the result of calling runStart( attributes), as an integer.

runOfSame()

Returns the number of characters with the same attributes beginning at start of string.

runOfSame(start)

Returns the number of characters with the same attributes beginning at start.

reset( string )

Replaces all the text in the editor with string, which must be an HTML document.

Read only. The attributes of the text at selectionStart, as a dictionary of .

GraphElem
Text Editor Type