BIM.works SDKs - v3.0.0-b.115
    Preparing search index...
    Index

    Constructors

    Properties

    element: HTMLDivElement

    The element the editor added to the container.

    language: DslLanguage

    The language.

    monacoEditor: any

    The Monaco editor (monaco.editor.IStandaloneCodeEditor), for what this package does not wrap.

    Methods

    • Runs handler on a key combination of Monaco KeyMod and KeyCode names, e.g. "CtrlCmd+Enter".

      Parameters

      • keys: string
      • handler: (editor: DslEditor) => void

      Returns void

    • Removes the editor from the page and frees it. Call it when the host component goes away.

      Returns void

    • Returns void

    • Formats the text with the language's formatter.

      Returns Promise<void>

    • Returns string

    • Re-measures the container. Automatic, except after it changed size while hidden.

      Returns void

    • Returns a function that removes the listener.

      Parameters

      • listener: (value: string) => void

      Returns () => void

    • Returns a function that removes the listener.

      Parameters

      Returns () => void

    • Returns a function that removes the listener.

      Parameters

      Returns () => void

    • Another instance from now on.

      Parameters

      • address: string

      Returns void

    • Switches the language, keeping the text.

      Parameters

      Returns void

    • The models whose names completion proposes from now on (DslEditorOptions.models).

      Parameters

      • models: string[] | (() => string[] | null | undefined) | null | undefined

      Returns void

    • Parameters

      • readOnly: boolean

      Returns void

    • Sets the page's theme (every editor follows).

      Parameters

      • theme: string

      Returns void

    • Parameters

      • token: DslToken | (() => DslToken | Promise<DslToken>)

      Returns void

    • Replaces the text as one undoable edit; no-op when it is the same text.

      Parameters

      • value: string

      Returns void

    • Validates the current text now; rejects when the services cannot be reached.

      Returns Promise<DslEditorStatus>