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

Missing 'templates' option in JsonEditorOptions #57

Closed
Axinet opened this issue Dec 20, 2019 · 2 comments
Closed

Missing 'templates' option in JsonEditorOptions #57

Axinet opened this issue Dec 20, 2019 · 2 comments

Comments

@Axinet
Copy link

Axinet commented Dec 20, 2019

Describe the bug
It looks like the 'templates' option is missing in the JsonEditorOptions class. It allows preparing predefined JSON parts to be easily inserted.

Expected behavior
JsonEditorOptions should have templates field allowing to set an array of "buttons" (text, title, className, field, value: any )

Screenshots
If applicable, add screenshots to help explain your problem.
Screen from JSONEditor options linked from README.
json-editor-settings

@Axinet
Copy link
Author

Axinet commented Dec 31, 2019

As whole settings object is forwarded to the underlying library, as for know it can be tricked with the following code:
let editorOptions: JsonEditorOptions = new JsonEditorOptions(); (<any>this.editorOptions).templates = [{menu options objects as in json editor documentation}]

@mariohmol
Copy link
Owner

Thanks @Axinet I included this workaround on the readme

the v1.9.0 includes this template and #58

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

No branches or pull requests

2 participants