SheetXL - v0.4.6
    Preparing search index...

    This is used by the Monaco Script editor and the command manager to enabled scripts to be execute and saved.

    interface Context {
        getEditor: () => Editor;
        getRanges: (address: RangesAddress) => ICellRanges;
        getSelectedFunction: () => Promise<SelectedFunction>;
        addContainerListener(listener: ContainerListener): Remove;
        getScripts(): IScript;
        isReadonly(): boolean;
        quickInsertFunction(functionName: string): void;
        saveSource(source: string): Promise<IModule>;
        setEditor(editor: Editor): void;
        setSelectedFunction(selected: Promise<SelectedFunction>): void;
    }
    Index

    Properties

    getEditor: () => Editor

    Returns the script editor.

    If the editor is not loaded this will return null.

    getRanges: (address: RangesAddress) => ICellRanges

    Decode a range from an address. Will return null if unable to decode.

    Used by the tooltips and range highlighting.

    getSelectedFunction: () => Promise<SelectedFunction>

    Return the selected.

    This is done because multiple clients share the same Context.

    Methods

    • Add listeners to the container.

      Parameters

      • listener: ContainerListener

      Returns Remove

      If this throws a listener save will be aborted.

    • Returns the IFunctionDescriptor Executable.

      Returns IScript

      This is used to enable the UI to display the available functions.

    • Returns if the script is readonly.

      Returns boolean

    • Set by the script editor when a function is selected. This may be null.

      Parameters

      • functionName: string

      Returns void

    • Save the source.

      Parameters

      • source: string

        The source to save.

      Returns Promise<IModule>

    • The the script editor.

      Parameters

      Returns void

    • Set by the script editor when a function is selected. This may be null.

      Parameters

      Returns void