Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (59 sloc) 2.57 KB
<!DOCTYPE html>
<html lang="en">
<!-- Those meta make the capture of handwriting inputs easier on mobile devices -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="true"/>
<title>myscript-text-web demo</title>
<link rel="stylesheet" href="../examples.css">
<script src="../../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="../../../../myscript-text-web.js"></script>
<myscript-text-web unloaded touch-action="none">
window.addEventListener('load', () => {
const textElement = document.querySelector('myscript-text-web');
console.log('All resources finished loading! Starting to init myscript-text-web');
// Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at with your myscript account
const configuration = {
scheme: 'https',
host: '',
applicationKey: '515131ab-35fa-411c-bb4d-3917e00faf60',
hmacKey: '54b2ca8a-6752-469d-87dd-553bb450e9ad'
// Testing if attributes binding via DOM, setAttribute or direct object manipulation is working.
textElement.setAttribute('scheme', configuration.scheme);
textElement.applicationkey = configuration.applicationKey;
textElement.hmackey = configuration.hmacKey;
// Testing if custom configuration is taken into account
textElement.configuration = {
recognitionParams: {
v4: {
text: {
margin: { // margins in millimeters
top: 20,
left: 10,
right: 10
export: {
jiix: {
'bounding-box': true,
'strokes': true
// Force the component to reload with the new configuration
textElement.unloaded = false;
You can’t perform that action at this time.