Skip to content

Commit

Permalink
xtal-json-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Jul 27, 2017
1 parent c16a6c6 commit 2306999
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 53 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ Polymer web wrapper around josdejong's awesome, most excellent JSON Editor a
```
<custom-element-demo>
<template>
<link rel="import" href="xtal-json-editor.html">
<link rel="import" href="xtal-json-editor-sync.html">
<link rel="import" href="../polymer/lib/elements/dom-bind.html">
<dom-bind>
<template>
<xtal-json-editor watch="[[objectToEdit]]"></xtal-json-editor>
<br>
Edited Value:
<code>[[myEditedResult]]</code>
</template>
</template>
</dom-bind>
<script>
Expand Down
5 changes: 4 additions & 1 deletion demo/index_sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ <h3>Basic xtal-json-editor demo</h3>
<template>
<dom-bind>
<template>
<xtal-json-editor watch="[[objectToEdit]]"></xtal-json-editor>
<xtal-json-editor watch="[[objectToEdit]]" edited-result="{{myEditedResult}}" as="text"></xtal-json-editor>
<br>
Edited Value:
<code>[[myEditedResult]]</code>
</template>
</dom-bind>
<script>
Expand Down
68 changes: 19 additions & 49 deletions jsoneditor.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions xtal-json-editor-sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<style include="xtal-json-editor-default-theme">

</style>
<div id="xcontainer"></div>
<div id="xcontainer" style$="height:[[height]];width:[[width]]"></div>
</template>
<script>
xtal_elements_json_editor_sync = true;
</script>
<script src="jsoneditor.min.js"></script>
<script src="jsoneditor.js"></script>
<script src="xtal-json-editor.js"></script>

</dom-module>

0 comments on commit 2306999

Please sign in to comment.