MonacoEditor

Editors. MonacoEditor

An editor implementation using Monaco

Constructor

new MonacoEditor()

Source:

Extends

Methods

deleteText(pos, val)

Description:
  • Inserts text into this editor
Source:
Overrides:
Parameters:
Name Type Description
pos number The position to delete from
val string The value to delete

focus()

Description:
  • Focuses the editor
Source:
Overrides:

getValue() → {string}

Description:
  • Get the current string value of this editor
Source:
Overrides:
Returns:
Type
string

insertAtSelection(text)

Description:
  • Inserts the given text at the current selection, if no selection just insert at the cursor position, else replace the current selection.
Source:
Overrides:
Parameters:
Name Type Description
text string The text to insert

insertText(pos, val)

Description:
  • Inserts text into this editor
Source:
Overrides:
Parameters:
Name Type Description
pos number The position to insert at
val string The value to insert

setForeignSelection(remoteClient, cursorSelection)

Description:
  • Sets a forign client selection marker in this editor
Source:
Overrides:
Parameters:
Name Type Description
remoteClient String Webstrate clientId of the remote client that has a selection in the fragment this editor is editing
cursorSelection Editors.Editor~cursorSelection The selection

setLine()

Description:
  • Sets the currently active line
Source:
Overrides:

setValue(value)

Description:
  • Sets the current string value of this editor
Source:
Overrides:
Parameters:
Name Type Description
value string

unload()

Description:
  • Unloads this editor
Source:
Overrides: