jsonform
Version:
Client-side JavaScript library that generates HTML forms from structured data models expressed using a JSON schema, possibly completed by a form layout description.
46 lines (45 loc) • 730 B
JavaScript
var tests = [
{
name: 'minimal',
jsonform: {
schema: {
code: {
type: 'string',
title: 'Code'
}
},
form: [
{
key: 'code',
type: 'ace',
aceMode: 'json',
width: '100%',
height: '100px'
}
]
}
},
{
name: 'value',
jsonform: {
schema: {
code: {
type: 'string',
title: 'Code'
}
},
form: [
{
key: 'code',
type: 'ace',
aceMode: 'json',
width: '100%',
height: '100px'
}
],
value: {
code: '<script>toto();</script><h1>Toto</h1>'
}
}
}
];