The only way I could see this being done is by using tampermonkey or some script to fetch it from the actual source.
I haven't seen anything on getting the html either so I'm sorry there. Also you can just send the messages to a textarea without html.
A little bit off-track, you can create a record every time a new chat is sent then ever so often loop thru the chat records to see what new chats should be added. This is a tadbit of code I always use for my chat screens for the Dungeon Destiny games.
//chat info
go("goChat", "warnChat");
go("acceptWarn", "chatt");
go("backChat", "home");
sayCS('home', 'announcements');
sayCS('warnChat', 'warnTxt');
sayCS('tosLog', 'tosLogTxt');
sayCS('tos', 'tosTxt');
function sayCS(scr, text){
onEvent(scr, "keydown", function(event){
if(event.key=='Alt'){
playSpeech(getText(text), "female", "English (UK)");
}
});
}
onEvent("chatt", "keydown", function(event){
if(event.key=="Enter"){
if (getText("setMessage")==''||null) {
setProperty("setMessage", "placeholder", "Please Type Something Before You Send It");
setTimeout(function() {
setProperty("setMessage", "placeholder", "Type A Message Here");
}, 2000);
} else if(getText("setMessage")!=''||null) {
if(username != '' ||null){
createRecord("chat", {from: username, message:(getText("setMessage"))}, function(){});
} else if(username == '' ||null){
createRecord("chat", {from: username, message:(getText("setMessage"))}, function(){});
}
}
setText("setMessage", "");
}
});
var messages;
function setChat() {
messages=[];
readRecords("chat", {}, function(records) {
for (var i =0; i < records.length; i++) {
if(!records[i].message.includes("fuck")){
appendItem(messages,(records[i]).from+ ": "+(records[i]).message);
}
}
messages.reverse();
setText("chat", messages.join("\n"));
});
}