I am trying to convert a Long Text Area Field to a RTF but when I do so I loose all the formatting it just removes the HTML tags and makes the area a whole chunk. So what I am trying is instead of converting a Long Text Area in to RTF, I created a new field which is RTF and through Apex Trigger I am moving the content like below
for (Knowledge__kav con : Trigger.new) {
con.SOP_Article_Body__c = con.Article_Body_Long_T__c.unescapeHtml4();
}
where SOP_Article_Body__c
is a RTF and Article_Body_Long_T__c
is a Long Text Area. Even then I am not able to see the HTML tag/formatting being retained. Am I missing anything here
Article_Body_Long_T__c