<juicy-jsoneditor>
Polymer Element that wraps josdejong/jsoneditor
Play with json
variable in your console, to experience two-way binding with <juicy-jsoneditor>
.
Please note, that .json
itself does not have deep two-way binding, as josdejong/jsoneditor does not notify on changes, just replaces entire object, so we mock it only on root level.
Examples
With name
attribute
<juicy-jsoneditor json="{{json}}" name="MyName"></juicy-jsoneditor>
With modes
attribute
<juicy-jsoneditor json="{{json::change}}" modes="['code', 'form', 'text', 'tree', 'view']"></juicy-jsoneditor>
With search
attribute set to false
<juicy-jsoneditor json="{{json::change}}" search="false"></juicy-jsoneditor>
With mode
attribute
<juicy-jsoneditor json="{{json::change}}" mode="text"></juicy-jsoneditor>
With indentation
attribute
<juicy-jsoneditor json="{{json::change}}" mode="text" indentation="4"></juicy-jsoneditor>
In code
mode without any json
content
<juicy-jsoneditor mode="code"></juicy-jsoneditor>
In tree
mode without any json
content
<juicy-jsoneditor mode="tree"></juicy-jsoneditor>