Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Unable to get the changed data #8

Open
mac4manu opened this issue Mar 7, 2017 · 4 comments
Open

Unable to get the changed data #8

mac4manu opened this issue Mar 7, 2017 · 4 comments

Comments

@mac4manu
Copy link

mac4manu commented Mar 7, 2017

@Urbansson -
I would like to capture the changes when user edits the JSON. I used angular2 wrapper.
I'm unable to get the changes. Please let me know if i'm doing wrong -
<json-editor [options]="{mode: 'code',onChange: checkData()}" [data]="_jsoncode">
https://github.com/josdejong/jsoneditor/issues/373
Is there any two way binding. Please share your thought.
Thank you
Manu

@megastas
Copy link

@Urbansson -
Same for me. I don't know how to get edited data, please help.
Could you create example?

@megastas
Copy link

@mac4manu
I have tried to put this to options:
this.editorOptions = { escapeUnicode: false, sortObjectKeys: false, history: true, mode: 'tree', search: true, indentation: 2, onChange: function() { alert(100); } };
And it is working, I see alert after change. I think in your example checkData() not available...
Issue can be closed.

@megastas
Copy link

@Urbansson onChange is working, but I can't to get changed data, please help

@vatsalpande
Copy link

@megastas
You can try this. It works for me
@ViewChild('generatedConfig') generatedConfig: JsonEditorComponent; this.generatedConfig.getText(); // Will give you edited content inside onChange
Hope this helps

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

No branches or pull requests

3 participants