I am writing a custom serializer and I want to extract the elements font-family, font-size, font-weight, font-style, cold, background-color, text-align
var re = new RegExp(/.*Class\('App', 'linb\.Com',(.*)/);
var stringToStore = content.replace(re, "{code:$1");
var modString = stringToStore.substr(0, stringToStore.length - 2)+"}";
var objectToStore = eval('(' + modString + ')');
var ctrls = objectToStore.code.Instance.iniComponents();
var templateDefn = new Object();
var newCtrls = new Array();
templateDefn.fieldElements = newCtrls;
for (i = 0; i < ctrls.length; i++) {
var ctrl = ctrls[i];
var type = ctrl.key;
if (type == "linb.UI.SLabel") {
var newCtrl = new Object();
newCtrl.left = ctrl.properties.left;
newCtrl.right = ctrl.properties.right;
newCtrl.top = ctrl.properties.top;
newCtrl.height = ctrl.properties.height;
newCtrl.width = ctrl.properties.width;
newCtrl.text = ctrl.properties.caption;
newCtrls.push(newCtrl);
}
}
How do I extract the font-family, font-size, font-weight, font-style, cold, background-color, text-align ?