I have a Canvas where I want to set its contents to a string which happens to be an HTML file in RAW format, how to make setContents() to ignore HTML formats?
Thanks.
I have a Canvas where I want to set its contents to a string which happens to be an HTML file in RAW format, how to make setContents() to ignore HTML formats?
Thanks.
By definition setContents() tells it what HTML to render. You need to process the file as a string first and strip out all html tags first.
thnaks.
but since I have to show the entire content of the HTML file, this is what I ended up to do.
pc = pc.replace("<", "<");
pc = pc.replace(">", ">");
pc = pc.replace("\r\n", "<br>");
pc = "<html>" + pc + "</html>";
pageSourceCanvas.setContents(pc);
Sanjiv