npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iink-ts

v2.0.1

Published

iinkTS is the fastest way to integrate handwriting panel and recognition in your webapp

Downloads

1,666

Readme

iinkTS

npm version Examples Documentation

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

:point_right: Examples:point_left:

iinkTS 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

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,
  • 72 supported languages.

You can discover all the features on our Developer website for Text and Math.

Requirements

  1. Have npm, yarn.
  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

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

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 iinkTS and the css :

<script src="node_modules/iink-ts/dist/iink.min.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 Editor constructor function, your editor html element and a simple configuration, then initialize it:
  • Initialization in the standard case, i.e. websocket or rest mode
  const editorElement = document.getElementById('editor');

  const editor = new iink.Editor(editorElement, {
      configuration: {
          server: {
              applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
              hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
          }
      }
  });
  editor.initialize();
  • Initialization in the offscreen case
  const editorElement = document.getElementById('editor');

  const editor = new iink.Editor(editorElement, {
        configuration: {
            offscreen: true,
            server: {
                applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
                hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
            }
        }
  });
  editor.initialize();
  1. Your index.html file should look like this:
  • In the standard case
<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" touch-action="none"></div>
        <script>
            const editorElement = document.getElementById('editor');

            const editor = new iink.Editor(editorElement, {
                configuration: {
                    server: {
                        applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
                        hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
                    }
                }
            });
            editor.initialize();
        </script>
    </body>
</html>
  • In the offscreen case
<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" touch-action="none"></div>
        <script>
            const editorElement = document.getElementById('editor');

            const editor = new iink.Editor(editorElement, {
                configuration: {
                    offscreen: true,
                    server: {
                        applicationKey: '#YOUR MYSCRIPT DEVELOPER APPLICATION KEY#',
                        hmacKey: '#YOUR MYSCRIPT DEVELOPER HMAC KEY#'
                    }
                }
            });
            editor.initialize();
        </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 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 [email protected].

Contributing

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.

Troubleshooting

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:

  • either update your server
  • either add in the iink-ts configuration configuration.server.version = 2.2.0

License

This library is licensed under the Apache 2.0.