Skip to content

can't access to editor instance #189

@inghvar

Description

@inghvar
      <MonacoEditor
        class="editor"
        ref="editor"
        v-model="code"
        theme="gCodeFirst"
        language="GCodeLanguage"
        @editorWillMount="editorDidMount"
        :options="options"
      >
      </MonacoEditor>
    editorDidMount (editor) {
      // Register a new language
      editor.languages.register({ id: 'GCodeLanguage' })
      var e = this.$refs.editor.getEditor()
      console.log(e)
      ...............................................
     ...............................................

in the console I get undefined
this.$refs.editor ==> also does not give access to the instance
I need to use functions like getPosition(), setPosition() but i can't access the editor instance, only to the model

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions