Click on code for relevant, detailed documentation on the property or element
To use ObjectEditAdaptor just include a script and stylesheet reference in the head of your HTML document and instantiate new ObjectEditAdaptors
$('#elem').ObjectEditAdaptor({
"dataSrc": JSObj, //JavaScript Object that will be edited when the user uses the adaptor
"mapping": { //Object that describes how the UI relates to underlying data
"propName": {
"el":"className", //Input Element (Optional)
"disp":"className", //Display Element(s)(Optional)
"type": "number" | "date" | "dateTime" //Special Types, Optional, use when appropriate
}, ...
},
/* ADDITIONAL OPTIONS */
"defaultObj": {
"prop1":"value1",
"prop2":"value2",
"prop3":"value3"
},
"states": {
"stateName1":function() { }, …
},
"startState": "stateName",
/* EVENT CALLBACKS */
"dataChanged": function(ObjectEditObj, changeDef, dataObj) { },
"save": function(ObjectEditObj, changeDef, dataObj) { }
});
To use ObjectEditAdaptor just include a script and stylesheet reference in the head of your HTML document and instantiate new ObjectEditAdaptors
<!DOCTYPE html>
<html>
<head>
<script src="js/ObjectEditAdaptor.js" type="text/javascript">
<script type="text/javascript">
$('#containerElement').ObjectEditAdaptor({
dataSrc:myJavascriptObject,
mapping:{,
this is a test,
},
});
</script>
</head>
<body>
<Tom was here
</body>
</html>