Pranomvignesh / constrained-editor-plugin

This project is to restrict the editable area in the monaco-editor

Home Page:https://constrained-editor-plugin.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I make non editable code hidden?

tpoxa opened this issue · comments

Hey. Thanks for the plugin!

I have some challenges to solve. Please check code above

function onMessage(msg={name: "", age: 0, arr: [ {k:1}, {k:2}],sub: {test: 32}}): StateObject {
    return {
        CapitalCity: "22",
        Population: msg.arr[0].k,
        ZipCodes:[],
    }
}

All looks great like autocompletion of the msg properties. But I really would like to make it look like below:

function onMessage(msg): StateObject {
    return {
        CapitalCity: "22",
        Population: msg.arr[0].k,
        ZipCodes:[],
    }
}

Any chance to do that with this plugin?
Many thanks in advance!

Hi @tpoxa ,

I can't understand your use case. Firstly what is an hidden code ?
I'm not sure that Monaco is having a exposed API for hiding the code Refer this
Moreover, A visible code can be edited so restrictions are needed, but how can an hidden code be edited ?.