UNPKG

@trystan2k/fleshy-jsoneditor

Version:

LitElement custom element that wraps http://github.com/josdejong/jsoneditor based on https://github.com/Juicy/juicy-jsoneditor

40 lines (37 loc) 849 B
<!DOCTYPE html> <html lang="en-GB"> <head> <meta charset="utf-8" /> <style> body { background: #fafafa; } </style> </head> <body> <div id="demo"></div> <script type="module"> import { html, render } from 'lit-html'; import '../fleshy-jsoneditor.js'; const json = { thiago: 'test', bovi: 'test', mendonca: { test1: 'value', test2: 'value' }, }; const mode = 'tree'; const modes = ['code', 'form', 'text', 'tree', 'view']; render( html` <fleshy-jsoneditor name="MyName" mode="${mode}" .json="${json}" .modes="${modes}" indentation="4" ></fleshy-jsoneditor> `, document.querySelector('#demo') ); </script> </body> </html>