✏️ ☁️ MyScriptJS is the fastest way to integrate rich handwriting recognition features in your webapp.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets [DOCS] Update readme Feb 15, 2018
config [DEV] Improve dev process with browser opening examples page Apr 25, 2018
dev [DEV] Add linter Sep 16, 2016
dist release: version 4.3.0 Dec 5, 2018
docker/examples [TEST] Add test for text rest iink Mar 20, 2018
docs release: version 4.3.0 Dec 5, 2018
examples fix(examples): remove localhost url in math inside page Dec 6, 2018
src feat(conf): make alwaysConnected true by default Nov 29, 2018
test reworked import test Nov 30, 2018
.babelrc [DEV] Separate rollup config file for dev and build Mar 14, 2018
.editorconfig [DEV] Add iink test dev/sample Apr 21, 2017
.esdoc.json fix npm vulnerabilities + upgrade esdoc (MSIS-1846) Nov 8, 2018
.eslintrc.json [DEV] Add rest mode for iink Feb 28, 2018
.gitignore [FIX] dist in gitignore for npm Oct 25, 2017
CHANGELOG.md fix(typo): changelog Dec 5, 2018
CONTRIBUTING.md [DOCS] Update readme Feb 15, 2018
Jenkinsfile feat(ci): add option to disable concurrent builds for this pipeline Nov 29, 2018
LICENSE [DEV] Add license Apr 19, 2017
Makefile [TEST] fixed jenkins tests Nov 28, 2018
Makefile.inc [TEST] Add test for text rest iink Mar 20, 2018
README.md [DOC] fixed #16 Oct 15, 2018
SETUP.md [DEV] Update Setup.md Mar 14, 2018
index.html [DEV] Improve dev process with browser opening examples page Apr 25, 2018
package-lock.json release: version 4.3.0 Dec 5, 2018
package.json release: version 4.3.0 Dec 5, 2018
preview.gif [DOCS] Add preview gif Mar 16, 2018

README.md

MyScriptJS

npm version Examples Documentation

The fastest way to integrate rich handwriting features in your webapp.

MyScriptJS 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.

Table of contents

Examples

Discover Interactive Ink with MyScriptJS 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

Features

  • 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.

Requirements

  1. Have npm, yarn or bower installed.
  2. Have a MyScript developer account. You can create one here.
  3. Get your keys and the free monthly quota to access MyScript Cloud at developer.myscript.com

Installation

MyScriptJS can be installed with the well known package managers npm, yarn and bower.

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 MyScriptJS and use it as showed in the Usage section.

npm install myscript
OR
yarn add myscript

You can also install MyScriptJS using bower (with or without an existing project) and use it as showed in the Usage section replacing node_modules by bower_components.

bower install myscript

Usage

  1. Create an index.html file in the same directory.

  2. Add the following lines in the head section of your file to use MyScriptJS and the css. We use PEP to ensure better browsers compatibilities. Note that you can also use it using dependencies from node_modules or bower_components:

<link rel="stylesheet" href="node_modules/myscript/dist/myscript.min.css"/>
<script src="node_modules/myscript/dist/myscript.min.js"></script>
<script src="https://code.jquery.com/pep/0.4.3/pep.js"></script>
  1. Still in the head section, add a style and specify the height and the width of your editor:
<style>
    #editor {
        width: 100%;
        height: 100%;
    }
</style>
  1. In the body tag, create a div tag that will contain the editing area:
    <div id="editor"></div>
  1. In JavaScript and within a <script> tag placed before the closing tag </body>, create the editor using the register function, your editor html element and a simple configuration:
  const editorElement = document.getElementById('editor');

  MyScript.register(editorElement, {
    recognitionParams: {
      type: 'TEXT',
      server: {
        applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
        hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
      }
    }
  });
  1. Your index.html file should look like this:
<html>
    <head>
        <link rel="stylesheet" href="node_modules/myscript/dist/myscript.min.css"/>
        <script src="node_modules/myscript/dist/myscript.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');

        MyScript.register(editorElement, {
            recognitionParams: {
                type: 'TEXT',
                server: {
                    applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
                    hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
                }
            }
        });
    </script>
    </body>
</html>
  1. 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.

Documentation

You can find a complete documentation with the following sections on our Developer website:

As well as a global Configuration page.

We also provide a complete API Reference.

Development

Instructions to help you build the project and develop are available in the SETUP.md file.

Getting support

You can get support and ask your questions on the dedicated section of MyScript Developer website.

Sharing your feedback ?

Made a cool app with MyScriptJS? 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.

Contributing

We welcome your contributions: if you would like to extend MyScriptJS for your needs, feel free to fork it!

Please take a look at our contributing guidelines before submitting your pull request.

License

This library is licensed under the Apache 2.0.