<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>RTF-parser WASM example</title>
<style>
section {
display: flex;
flex-flow: column nowrap;
}
button {
max-width: 30vw;
}
</style>
</head>
<body>
<h1>RTF-Parser example</h1>
<section>
<label>
<textarea></textarea>
</label>
<button>Parse</button>
</section>
<script type="module">
import init, { parse_rtf } from "../../pkg/rtf_parser.js";
init().then(() => {
let doc = parse_rtf("{ \\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard Voici du texte en {\\b gras}.\\par }");
console.log(doc)
});
</script>
</body>
</html>