FE-Mars/monaco-editor-vue

Why the options not work

Closed this issue · 2 comments

I get a monaco json editor in vue project as this:
<MonacoEditor language="json" :options="options" :value="jsonData" @change="onChange" > </MonacoEditor>
and set the options in data:

    options: object = {
        formatOnType: true,
        scrollBeyondLastLine: false,
        autoClosingQuotes: "always",
        showFoldingControls: "always",
    };

But not every option works. "autoClosingQuotes" and "showFoldingControls" cannot work as expected.

Please give me some hints.

This website presents a default setting of the monaco-editor without any options. But it's support
"autoClosingQuotes" and "showFoldingControls". I am so confused about that.

https://microsoft.github.io/monaco-editor/playground.html#creating-the-editor-hello-world

@yijiao19 I use the following configuration to work

vue.config.js

new MonacoWebpackPlugin({
        languages: ['json']
})

Monaco Editor Options

options: {
        autoClosingQuotes: true,
        showFoldingControls: "always",
}

@yijiao19 Sorry, I did not receive your reply, I will close the issue. If you have any questions, please contact me again