Directory

← Back

juicy-jsoneditor

Polymer Element that wraps josdejong/jsoneditor and adds two-way binding for edited JSON.

Author

Rating

Popularity

<100

[ This description is mirrored from README.md at github.com/Juicy/juicy-jsoneditor on 2019-05-22 ]

<juicy-jsoneditor>

Polymer Element that wraps josdejong/jsoneditor and adds two-way binding for edited JSON.

Demo

Check it live!

Install

Install the component using Bower:

$ bower install juicy-jsoneditor --save

Or download as ZIP.

Usage

  1. Import Web Components' polyfill, if needed:

    <script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
    
  2. Import Custom Element:

    <link rel="import" href="bower_components/juicy-jsoneditor/juicy-jsoneditor.html">
    <!-- josdejong/jsoneditor#104 workaround-->
    <link rel="stylesheet" type="text/css" href="bower_components/jsoneditor/jsoneditor.min.css">
    
  3. Start using it!

    <juicy-jsoneditor></juicy-jsoneditor>
    

Options

Attribute Options Default Description
json Object {} JSON to edit.
mode String tree Editing mode, see API
modes Array of Strings List of editing modes to be available, see API
name String Object name, see API
search Boolean true Toggle search box, see API
indentation Number 2 Indentation, see API
history Boolean true Toggle history - undo, redo, see API

Properties

All attributes, plus:

Name Type Description
editor JSONEditor JSONEditor instance.

Methods

  • set,
  • setMode,
  • setName,
  • setText,
  • get,
  • getName,
  • getText

delegated to JSONEditor's methods

Events

Event event.details Description
change {action: "JSONEditor-action", params: {..} } Triggers when json changes.

Notes

Contributing and Development

History

For detailed changelog, check Releases.

License

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

  • polymer#>=1.5.0
  • jsoneditor#josdejong/jsoneditor#^5.5.6
  • fast-json-patch#~1.0.0
Released
2017-03-31
Maturity
IMPORTED
License
MIT License

Compatibility

Framework
Polymer 1.0+
Polymer 2.0+ in 1.2.0
Browser
Browser Independent

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online