You need to sign in to do that
Don't have an account?
AbiPat
Trouble Using HTML Data From the Rich Text Editor
I am trying to grab the data stored in a rich text field in its HTML format, and send it via a REST API callout. I noticed that the rich text editor adds tags like <span>, which are irrelevant and unneccesary, and it also adds the 'style' attribute to the <br> tag (ie <br style="">). Lastly, it also adds newlines using \n when I print the html output using system.debug(). [I dont see the '\n', but I can see the string broken into multiple lines in system.debug()].
Has anyone faced this issue, and are there any ways getting around this? Happy to provide details if needed.
Has anyone faced this issue, and are there any ways getting around this? Happy to provide details if needed.
I guess I ll have to follow the former approach - ie parse out the \n's etc - as I want to remove only the improperly formed html tags, so that rules out the regex. Hopefully the editor will get better and more reliable with future releases!