xtal-json-editor

0.0.44 • Public • Published

Published on webcomponents.org

<xtal-json-editor>

Vanilla web component wrapper around josdejong's awesome, most excellent JSON Editor api, which can be found at https://github.com/josdejong/jsoneditor

Although the web component does not depend on Polymer, it can work with its binding. The output of the editor can either be text, or JSON, as specified by the as attribute:

    <div>Input:</div>
    <xtal-json-editor id="firstEditor" options="{}" as="json"></xtal-json-editor>
    <p-d on="edited-result-changed" to="xtal-json-editor{input}"></p-d>
    <div>Output:</div>
    <xtal-json-editor options="{}"></xtal-json-editor>

The markup above is using the pass down element (p-d) to bind the two instances together, but you can also use Polymer or custom event handling.

Viewing Your Element

$ npm install
$ npm run serve

or

<script type=module src="https://cdn.pika.dev/xtal-json-editor"></script>

/xtal-json-editor/

    Package Sidebar

    Install

    npm i xtal-json-editor

    Weekly Downloads

    34

    Version

    0.0.44

    License

    MIT

    Unpacked Size

    3.03 MB

    Total Files

    46

    Last publish

    Collaborators

    • bahrus