Set text widget text properties
Functions covered
Composition structure
Composition script
Last updated
Last updated
(function() {
return {
init: function(comp, context) {
// get reference to the title and subtitle widget
const wiLowerTitle = comp.findWidget("lowerTitle")[0];
const wiLowerSubtitle = comp.findWidget("lowerSubtitle")[0];
// update the single-line title
wiLowerTitle.setPayload({
"text": "This is the new title"
});
// update the multi-line subtitle
wiLowerSubtitle.setPayload({
"text": "New subtitle line 1\nNew subtitle line 2"
});
},
close: function(comp, context) {}
};
})();