How do you get text from webviewer?

You didn’t say, but my guess is you are calling your html and files from a server (not locally on the app - it will not work!)

This being the case, something like this will work for you. You have to let the objects load before doing anything (hence the button) but you can use onload events to automate

<!DOCTYPE html>
<html>
<meta name=“viewport” content=“width=device-width, initial-scale=1.0”>

<head>
	<title>Object Grab</title>
	
</head>

<body>
	<object id ="file1" data = "file1.txt" ></object><br>
	<object id ="file2" data = "file2.txt" ></object><br>
	<object id ="file3" data = "file3.txt" ></object><br>
	<button onclick="getData()">Get Data</button>
</body>

<script>

function getData() {
var wvs1 = document.getElementById('file1').contentDocument.body.childNodes[0].innerText;
var wvs2 = document.getElementById('file2').contentDocument.body.childNodes[0].innerText;
var wvs3 = document.getElementById('file3').contentDocument.body.childNodes[0].innerText;
window.AppInventor.setWebViewString("[[" + wvs1 + "],[" + wvs2 + "],[" + wvs3+ "]]");
}

</script>

</html>

You can play around with the webviewstring output to your liking :wink: