Let’s be honest—most of us have been using Windows since we were kids. It’s the backbone of the corporate world and feels like the default choice for every computer user. For years, I thought it was the only real option. But what if I told you there isn't just an "alternative" out there, but a genuine upgrade? When people talk about switching to Linux , it can feel overwhelming because there are so many versions. However, I want to talk specifically about Ubuntu .
Here I am going to show you, How to insert formatted data (table, colorful text etc) in rich text area field salesforce. We can directly use updated rich text area in our email templates without doing any extra code for email template.
Here is sample code.
Below code is for table:-
string table ='<p><span style=\"color: #2e6c80;\"><strong>Table Heading</strong></span>
</p>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-size:12px;\">\r\n<tbody>';
table+=createColumn('table column ame 1','Table column Value 1');
table+=createColumn('Your column Name 2','table column value 2');
public static string createColumn(string column,string value){
return '<tr>\r\n<td>'+column+'</td>\r\n<td tabindex=\"0\">\r\n<div>'+value+'</div>\r\n</td>\r\n</tr>';
}
Here is sample code.
//Heading for rich text area content.
string body='<h3 style=\"color: #2e6c80;\">your heading :</h3>\n
<ol style=\"list-style: none; font-size: 12px; line-height: 32px; \">\n';
body += '<li style=\"clear: both;\"><b>'+Your Label Name+' : </b> '+
yourValue.replaceAll(';',' , ') +'</li>';
body +='</ol>';
yourRichTextAreaField=body;
Below code is for table:-
string table ='<p><span style=\"color: #2e6c80;\"><strong>Table Heading</strong></span>
</p>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-size:12px;\">\r\n<tbody>';
table+=createColumn('table column ame 1','Table column Value 1');
table+=createColumn('Your column Name 2','table column value 2');
table+='</tbody>\r\n</table>';public static string createColumn(string column,string value){
return '<tr>\r\n<td>'+column+'</td>\r\n<td tabindex=\"0\">\r\n<div>'+value+'</div>\r\n</td>\r\n</tr>';
}