I have below data stored in a rich text are field.
<html><head></head><body>Hello</body></html>
Controller
public with sharing class ContentController {
public List<Content__c> contentList {get;set;}
public ContentController() {
getContent();
}
private void getContent() {
ContentList = [SELECT Id,HTMLContent__c,
FROM Content__c LIMIT 2];
}
}
Page
<apex:outputText value="{!ContentList[0].Content__c}">
escape="false"
</apex:outputText>
But when i render data in the page it is not displaying content, rather it is displaying html as a text.
"<html><head></head><body>Hello</body></html>"
Can anyone help me with this?
hello
. The only issues I had were problems you probably introduced when you wrote the question. Please consider editing your question to fix these errors, it won't compile like this!{!ContentList[0].Content__c}
should be{!ContentList[0].HTMLContent__c}
- there also is a comma too much in your SOQL, FROM Content__c
and yourescape="false"
should be within the tag. Since I could not reproduce it, please provide more details about your problem.