Which is the best way to load a string (HTML code) in TWebBrowser?
I have a string var 'HTMLCode' that contains HTML code. I want to load this code into the browser. This is Embarcadero's code: procedure THTMLEdit.EditText(CONST HTMLCode: string); {VAR Doc: IHTMLDocument2; TempFile: string; } begin TempFile := GetTempFile('.html'); StringToFile(TempFile, HTMLCode); wbBrowser.Navigate(TempFile); Doc := GetDocument; if Doc <> NIL then Doc.Body.SetAttribute('contentEditable', 'true', 0); //crash here when I load complex html files DeleteFile(TempFile); end; It has some problems so I replaced it with this one: procedure THTMLEdit.EditText(CONST HTMLCode: string);