You need to sign in to do that
Don't have an account?
Matt Urbanowski
Getting formatted HTML text in Apex
Is there any way to get just the "OuterHTML" text of a richtext field through Apex (NOT Visualforce)? I've checked all the String functions but none of them seem to do this.
e.g. the actual field content is: <body> This is the contents. </body>
I would like a trigger to return the value "This is the contents."
Is this possible?
Thanks,
Matt
e.g. the actual field content is: <body> This is the contents. </body>
I would like a trigger to return the value "This is the contents."
Is this possible?
Thanks,
Matt
Are you saying that you want a plain text from the html? If that's you wanted , then you can try stripHtmlTags(htmlInput) string function of apex.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_string.htm
Hope this helps.
All Answers
Are you saying that you want a plain text from the html? If that's you wanted , then you can try stripHtmlTags(htmlInput) string function of apex.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_string.htm
Hope this helps.