Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

✏️ ☁️ myscript-common-element is the common layer of myscript-math-web and myscript-text-web

License

Notifications You must be signed in to change notification settings

MyScript/myscript-common-element

Repository files navigation

MyScript Common Element

npm version Examples Documentation

⚠️ This repository is archived ⚠️

iinkJS grants you high integration flexibility by letting you choose your favorite framework or components. For this reason, we have decided to focus on iinkJS and to discontinue our ready-to-use Web components.

For more information, please see documentation.

We also provide an example to integrate iinkJS as webcomponent: link.

🚧

The common layer of myscript-math-web and myscript-text-web.

myscript-common-element is a Web component that can be used in every web application to bring handwriting recognition and conversion.

It integrates all you need:

  • Signal capture for all devices,
  • Digital ink rendering,
  • Link to MyScript Cloud to bring handwriting recognition.

If you are not familiar with Web components and Polymer, please consider using MyScriptJS or our out-of-the-box components myscript-math-web and myscript-text-web.

Table of contents

Examples

If you're not familiar with MyScript and Interactive Ink, consider discovering its major features with our text demo and tutorial.

Simple text example of myscript-common-element.

All our examples with the source codes.

Features

  • 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 or yarn 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

Use an existing project or start a fresh one.

npm init

Install myscript-common-element and use it as showed in the Usage section.

npm install myscript-common-element

Usage

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

  2. Add the following lines in the head section to import the library and the webcomponents polyfill.

<script type="module" src="node_modules/myscript-common-element/myscript-common-element.js"></script>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
  1. Still in the head section, add the following style:
<style>
    myscript-common-element {
        height: 100vh;
    }
</style>
  1. Use the component in the body section with the keys you received by mail.
  <myscript-common-element
        applicationkey="YOUR MYSCRIPT DEVELOPER APPLICATION KEY"
        hmackey="YOUR MYSCRIPT DEVELOPER HMAC KEY">
  </myscript-common-element>
  1. Your index.html file should look like this:
<html>
    <head>
        <script type="module" src="node_modules/myscript-common-element/myscript-common-element.js"></script>
        <script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
        <style>
            myscript-common-element {
                height: 100vh;
            }
        </style>
    </head>
    <body>
      <myscript-common-element
        applicationkey="YOUR MYSCRIPT DEVELOPER APPLICATION KEY"
        hmackey="YOUR MYSCRIPT DEVELOPER HMAC KEY">
      </myscript-common-element>
    </body>
</html>
  1. Launch a local Web server to start using it! We recommend to use the polymer one, you can find more information on the Polymer website.
polymer serve

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:

We also provide a complete API Reference.

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 myscript-common-element? 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 myscript-common-element 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.