Coder Social home page Coder Social logo

infiman / juicy-jsoneditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juicy/juicy-jsoneditor

0.0 1.0 1.0 53 KB

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

Home Page: http://juicy.github.io/juicy-jsoneditor/

License: MIT License

JavaScript 5.41% HTML 94.59%

juicy-jsoneditor's Introduction

<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

History

For detailed changelog, check Releases.

License

juicy-jsoneditor's People

Contributors

infiman avatar juravenator avatar mihaiii avatar samuelli avatar tomalec avatar warpech avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.