Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2242

Re: Changing Font Size and Color in TextArea

$
0
0

Just define a class:

 

.blueFont {    color: #00F !important;    font-size: 24px !important;
}

and in the change event handler for your checkbox, toggle the class:

 

toggleClass: function(oEvent) {    var oTA = this.getView().byId("myTextArea");    if (oEvent.getParameter("checked")) {        oTA.addStyleClass("blueFont");    }    else {        oTA.removeStyleClass("blueFont");    }
}

However, keep in mind that changing the color and/or font size does NOT change the data to be submitted; it will just be the unformatted textarea value

 

EDIT: Jamie Cawley already beat me to it


Viewing all articles
Browse latest Browse all 2242

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>