A temporary initialization value.
Delete a single character of text at caret.
The keyboard key that performs the deletion.
Whether a character was deleted.
Delete the current selection from the document. If the selection is not well-formed, this is a no-op.
We do not call this a "cut" because a real cut operation modifies the clipboard. Whereas this does not.
false
if there was no selection to process, or the selection
was empty. true
otherwise.
Enter a state in which all tasks are suspended. It is possible to call this
method while the state is already in effect. Its sister method
exitTaskSuspension
should be called the same number of times to resume
the tasks.
Exit a state in which all tasks are suspended. For the state to be
effectively exited, this method needs to be called the same number of times
enterTaskSuspension
was called.
Expand the error panel if there is no navigation.
Finds the location of the character closest to the x, y
coordinates. Very often this will be the character whose bounding client
rect encloses the coordinates. However, if no such character exists the
algorithm will return the closest character. If multiple characters are at
the same distance, then the first one found will be returned.
The x coordinate in client coordinates.
The y coordinate in client coordinates.
The location of the boundary character. The value return is
undefined
if the coordinates are outside the client or if the element
in which the click occurred is not inside the editor pane (a descendant of
this.guiRoot
).
Returns the list of element transformations for the location pointed to by the caret.
The location in the document. This must be a data location, not a GUI location.
The types of transformations to get.
An array of objects having the fields tr
which contain the
actual transformation and name
which is the unresolved element name for
this transformation. It is exceptionally possible to have an item of the
list contain undefined
for name
.
Handler preparing nodes included into the tree. This handler preforms an initial generic setup that does not need mode-specific information.
Creates a new task runner and registers it with the editor so that it is started and stopped by the methods that stop/start all tasks.
The task that the runner must run.
The new runner.
Opens a documentation link.
The URL to open.
Record an undo object in the list of undoable operations.
Note that this method also provides the implementation for the restricted method of the same name that allows only "wed/undo".UndoMarker objects.
The object to record.
Reset the label visibility level to what it was when the editor was first initialized.
Triggers the resizing algorithm.
Unconditionally resume all tasks.
If we are not in the task suspended state that is entered upon calling
enterTaskSuspension
, resume the task right away. Otherwise, this is a
no-op.
Set the visibility level to a specific value. It is a no-op if it is called with a value that is less than 0 or greater than the maximum level supported, or if the new level is the same as the current level.
The new level.
Set the location bar to a new location.
The element at which the location should point.
Unconditionally stop all tasks.
Simulates typing text in the editor.
NOTE: this function is limited in what it can simulate. The main editing pane is where you get the most support. Other locations offer less support. One good example is the minibuffer. Typing a string into it works fine. Trying to use directional arrows and backspace/delete currently does not work. We'd have to write custom code to handle these cases because it is not possible, as we speak, to write JavaScript code that entirely simulates pressing keyboard keys. (JavaScript easily supports sending the events generated by hitting the keyboard, but this is not enough.)
The text to type in. An array of keys, a string or a single key.
Generated using TypeDoc
This is the class to instantiate for editing.