iinkJS is no longer maintained, you must now use iink-ts
The fastest way to integrate rich handwriting features in your webapp.
iinkJS is a JavaScript library that can be used in every web application to bring handwriting recognition.
It integrates all you need:
- Signal capture for all devices,
- Digital ink rendering,
- Link to MyScript Cloud to bring handwriting recognition.
- Examples
- Features
- Requirements
- Installation
- Usage
- Documentation
- Development
- Support
- Feedback
- Contributing
Discover Interactive Ink with iinkJS and its major features with our text demo and tutorial.
Try our two basic examples featuring the text recognition and the math recognition.
All our examples with the source codes in this directory.
We also provide examples of integration with the major JavaScript frameworks:
Framework | Link |
---|---|
Example of React integration | |
Example of Angular integration | |
Example of Vue integration |
- Text and Math support,
- Easy to integrate,
- Digital ink capture and rendering,
- Rich editing gestures,
- Import and export content,
- Styling,
- Typeset support,
- More than 200 mathematical symbols supported,
- 65 supported languages.
You can discover all the features on our Developer website for Text and Math.
- Have npm, yarn.
- Have a MyScript developer account. You can create one here.
- Get your keys and the free monthly quota to access MyScript Cloud at developer.myscript.com
iinkJS 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 iinkJS and use it as showed in the Usage section.
npm install iink-js
OR
yarn add iink-js
-
Create an
index.html
file in the same directory. -
Add the following lines in the
head
section of your file to use iinkJS and the css. We use PEP to ensure better browsers compatibilities. Note that you can also use it using dependencies fromnode_modules
:
<script src="node_modules/iink-js/dist/iink.min.js"></script>
<script src="https://code.jquery.com/pep/0.4.3/pep.js"></script>
- Still in the
head
section, add astyle
and specify the height and the width of your editor:
<style>
#editor {
width: 100%;
height: 100%;
}
</style>
- In the
body
tag, create adiv
tag that will contain the editing area:
<div id="editor"></div>
- In JavaScript and within a
<script>
tag placed before the closing tag</body>
, create the editor using theregister
function, your editor html element and a simple configuration:
const editorElement = document.getElementById('editor');
iink.register(editorElement, {
recognitionParams: {
type: 'TEXT',
server: {
applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
}
}
});
- Your
index.html
file should look like this:
<html>
<head>
<script src="node_modules/iink-js/dist/iink.min.js"></script>
<script src="https://code.jquery.com/pep/0.4.3/pep.js"></script>
<style>
#editor {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="editor" touch-action="none"></div>
<script>
const editorElement = document.getElementById('editor');
iink.register(editorElement, {
recognitionParams: {
type: 'TEXT',
server: {
applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
}
}
});
</script>
</body>
</html>
- Open
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:
- Get Started: how to use iinkJS with a full example,
- Editing: how to interact with content,
- Conversion: how to convert your handwritten content,
- Import and Export: how to import and export your content,
- Styling: how to style content.
As well as a global Configuration page.
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 iinkJS? 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 iinkJS for your needs, feel free to fork it!
Please take a look at our contributing guidelines before submitting your pull request.
This library is licensed under the Apache 2.0.