Uploaded html is working perfectly.
But html created and saved in app just shows the content with format.
In my case, the html content is not constant, some of context is received from server and processed in the app. As a sample, I put below content and saved as a html file in blocks, and loaded in webviewer after filesaved. Now the contents and format of text are visible .but neither button , nor href is replacing the h3 content on mobile.
<!DOCTYPE html>
<html>
<style>
.header {
/* Stick to the top */
position: sticky;
overflow: auto;
top: 0;
background:cyan
}
div.b {
word-wrap: normal;
}
</style>
<script type = "text/javascript">
const myObj = {
"Good":["Nice,Happy"],
"fable":["legend,story,parable"],
"ridiculed":["mocked"],
"pace":["walk"],
"beat":["defeat,pound"],
"fatigue":["tired,washout,weary"],
};
//<a href="javascript:findMeaning('Good')">Good</a>
function findMeaning(textval) {
var obj;
obj = JSON.parse(JSON.stringify(myObj));
document.getElementById("id01").innerHTML = obj[textval];
}
</script>
<body>
<header id="header"; class="header"><h3 id="id01">Click on the words to find synonyms</h3></header>
Have a <button onclick="findMeaning('Good')">Good</button> day ahead.<br><br>
The hare and the tortoise <a href="javascript:findMeaning('fable')">fable</a>.<br>
</body>
</html>
.header {
/* Stick to the top */
position: sticky;
overflow: auto;
top: 0;
background:cyan
}
div.b {
word-wrap: normal;
}
Click on the words to find synonyms
Have a Good day ahead.
The hare and the tortoise
fable.