JSONedit
JSONedit copied to clipboard
Add a table type to a JSON editor
I would like to add a Table type along with the existing types (e.g., Text, Boolean), so that users could fill in a table and add it to the JSON object:

By adding the following code in addItemTemplate (and some other code) in directives.js, it does show the above table. But I don't know how to do the rest, i.e., adding the instance to the JSON object after pressing the Add button. Note that we could get the data of a handsontable instance from its hot-id like this.
`+ '<span ng-show="$parent.valueType == \'' +tableName+'\'"> :
<div ng-controller="MainCtrl as ctrl"><hot-table hot-id="mytable" datarows="ctrl.db.items" height="50" width="100"></hot-table></div>'`
Could anyone give me some hint?
Thanks
Tie
PS: here is the entire project I have at the moment: plnkr, all the table-related modifications are in directives.js.