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

I am trying to use other name instead of "root" for UI. #58

Closed
brij281 opened this issue May 9, 2018 · 2 comments
Closed

I am trying to use other name instead of "root" for UI. #58

brij281 opened this issue May 9, 2018 · 2 comments

Comments

@brij281
Copy link

brij281 commented May 9, 2018

First and first thanks a lot guys for such type work.

I am trying to use other name instead of "root" for UI. Basically don't want to display "root" on UI. I tried following way, but it not worked for me.

  1. JSONEditor.defaults.options.form_name_root = "newUI";
  2. jsonUI = new JSONEditor($editor, {
    schema: Schema,
    startval: initialData,
    form_name_root:"newUI"
    });

I am suspecting issue in line#1434. it is not replacing the string.
if (this.jsoneditor.options.form_name_root) this.formname = this.formname.replace(/root^[/,this.jsoneditor.options.form_name_root+'[');

@marc7000
Copy link
Collaborator

Add a title attribute in the root element.
See the example below and compare the schemas:
Without tittle attribute
With title attribute

@germanbisurgi
Copy link
Collaborator

@brij281 you were indeed right. I made a PR for this. Thanks for letting us know

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

4 participants