The fastest way to integrate rich handwriting features in your webapp.
:point_right: Examples:point_left:
iinkTS is a TypeScript library that can be used in every web application to bring handwriting recognition.
It integrates all you need:
You can discover all the features on our Developer website for Text and Math.
iinkTS can be installed with the well known package managers npm
, yarn
.
If you want to use npm
or yarn
you first have to init a project (or use an existing one).
npm init
OR
yarn init
You can then install iinkTS and use it as showed in the Usage section.
npm install iink-ts
OR
yarn add iink-ts
Create an index.html
file in the same directory.
Add the following lines in the head
section of your file to use iinkTS and the css :
<script src="node_modules/iink-ts/dist/iink.min.js"></script>
head
section, add a style
and specify the height and the width of your editor:<style>
#editor {
width: 100%;
height: 100%;
}
</style>
body
tag, create a div
tag that will contain the editing area: <div id="editor"></div>
<script>
tag placed before the closing </body>
tag, create the editor using the load
function of the editor, your html editor element, the type of editor desired and the possible options depending on the type of editor then initialize it: const editorElement = document.getElementById('editor');
const editor = await iink.Editor.load(editorElement, "INTERACTIVEINK", /* or INTERACTIVEINKSSR or INKV1 or INKV2*/
{
configuration: {
server: {
applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
}
}
});
index.html
file should look like this:<html>
<head>
<script src="node_modules/iink-ts/dist/iink.min.js"></script>
<style>
#editor {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="editor"></div>
<script>
const editorElement = document.getElementById('editor');
const editor = await iink.Editor.load(editorElement, "INTERACTIVEINK", /* or INTERACTIVEINKSSR or INKV1 or INKV2 */
{
configuration: {
server: {
applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
}
}
});
</script>
</body>
</html>
index.html
in your browser or serve your folder content using any web server.You can find this guide, and a more complete example on the MyScript Developer website.
You can find a complete documentation with the following sections on our Developer website:
We also provide a complete API Reference.
Instructions to help you build the project and develop are available in the SETUP.md file.
You can get support and ask your questions on the dedicated section of MyScript Developer website.
Made a cool app with iinkTS? We would love to hear about you! We’re planning to showcase apps using it so let us know by sending a quick mail to myapp@myscript.com.
We welcome your contributions: if you would like to extend iinkTS for your needs, feel free to fork it!
Please take a look at our contributing guidelines before submitting your pull request.
If you encounter the error: Unrecognized property: convert.force
, this means your server version is lower than 2.3.0.
To correct the problem, you have 2 options:
configuration.server.info.version = 2.2.0
If you encounter the error: Unrecognized property: configuration.export.jiix.text.lines
, this means your server version is lower than 3.2.0.
To correct the problem, you have 2 options:
configuration.server.info.version = 3.1.0
This library is licensed under the Apache 2.0.