Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reducing Tree's json editor ability #1511

Open
syedjavedahmed opened this issue Apr 24, 2023 · 5 comments
Open

Reducing Tree's json editor ability #1511

syedjavedahmed opened this issue Apr 24, 2023 · 5 comments
Labels

Comments

@syedjavedahmed
Copy link

Hi I am using 3 modes while loading my data into json on my webpage,

I wanted to reduce tree mode's ability....

I actually wanted a form like mode with insert buttons on left.

Basically, I wanted to reduce a user's ability into changing key side of string, and only allow it to either add more key value or edit the existing value side of key.
I tried adding css in form mode, but it seems like it doesnt support it...

Any other way of achieving it? or making changes to tree mode to make key side non-editable?

@josdejong
Copy link
Owner

Have you tried the form mode?

@syedjavedahmed
Copy link
Author

Yes, Form we are using to provide to user to edit value side json only.

For Admin we need to limit his ability from Changing Key side of a json object but to be also be able to add a new key value pair within the template!

@josdejong
Copy link
Owner

One option could be to add a button in the main menu using the option onCreateMenu. This button could get the selected path, and then insert a new key in the selected object.

@syedjavedahmed
Copy link
Author

Yes, but the problem we have is we want to limit users ability into changing key side in json data but also allow him to have ability to add new key : value pair.

@josdejong
Copy link
Owner

yes, so the form mode would disable editing keys, and the custom menu button would allow adding a new key:value pair?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants