You need to sign in to do that
Don't have an account?
ab84
Default value on rich text field
I have an visualforce page that uses a class extension to pre-populate some fields.
nws.NewsBody__c = 'Test default info'; works fine for text.
The NewsBody__c field is a rich text field. How would I update my extension so that it includes images as the default value?
nws.NewsBody__c = 'Test default info'; works fine for text.
The NewsBody__c field is a rich text field. How would I update my extension so that it includes images as the default value?
You can find solution here :
http://www.oyecode.com/2013/04/how-to-prepopulate-text-box-field-on.html
-Thank you
The following code is working for me in the extension class
public Listing__c listing{get;set;}
public ListingPageCon(ApexPages.StandardController cnt) {
listing = (Listing__c)cnt.getRecord();
listing.testrichtext__c = '<img alt="User-added image" src= "https://chiddu-dev-ed--c.ap1.content.force.com/servlet/servlet.FileDownload?file=01590000003LPFw"></img>';
}
I hope it will work for you too. replace the URL with your image url.
Thank you