

While the following method edits text in at a specified location: bool, string? ScriptDocument:EditTextAsync(string newText, int startLine, int startColumn, int endLine, int endColumn) The provided ScriptDocument methods allow you to asynchronously query and modify the state of these contents.įor example, the following method retrieves text from a Script at a specified location: string ScriptDocument:GetText(int startLine?, int startColumn?, int endLine?, int endColumn?) It represents the contents of the document, including ephemeral data such as cursor position and selection, as well as uncommitted edits made in Team Create Collab Editing mode (which may not be in the. See below for more detailed information! API Overview ScriptDocumentĪ ScriptDocument instance is a proxy of an open Script Editor document (including the Command Bar). The beta can be enabled by toggling Studio > Beta Features > Script Editor API. Read and edit specified portions of a Script without overwriting the entire contents.

