<!DOCTYPE html>
<!--Compile the JS binding first to use this, and put the generated lipsum.js and lipsum.wasm in the directory-->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>lipsum-cpp embind example</title>
</head>
<body>
<div id="content"></div>
<script src="lipsum.js"></script>
<script>
createLipsumCpp().then(Module =>
{
console.log(Module.LIPSUM_CPP_VERSION_FULL);
const gen = new Module.lpsm_Generator();
console.log(gen.fmt_text(20, Module.lpsm_GeneratorFlags.MARKDOWN.value));
console.log(Module.lpsm_CountSentences("Yes this is a test. Testing 123. Testing 123. Foobar test."));
const text = gen.fmt_text(15, Module.lpsm_GeneratorFlags.HTML.value);
console.log(text);
document.querySelector("#content").innerHTML = text;
});
</script>
</body>
</html>