vue-jsoneditor icon indicating copy to clipboard operation
vue-jsoneditor copied to clipboard

JSONEditor can now be used as a controlled component

Open josdejong opened this issue 7 years ago • 1 comments

@manico I think you will like the latest releases of the jsoneditor: since v5.20.1 the editor supports being used a controlled component in a framework like React or Vue. There are two new methods update(json) and updateText(text) for this, and two new callback methods onChangeText and onChangeJSON (checkout the docs for details).

You can find two React examples in the examples folder for inspiration:

https://github.com/josdejong/jsoneditor/tree/master/examples/react_demo https://github.com/josdejong/jsoneditor/tree/master/examples/react_advanced_demo

Would that be interesting for the vue-jsoneditor component as well?

josdejong avatar Aug 13 '18 19:08 josdejong

Yes. I would like to see PR for this.

manico avatar Sep 02 '18 14:09 manico