|
1 |
| -`myscript-common-element` is the common layer of [myscript-math-web](https://github.com/MyScript/myscript-math-web) and [myscript-text-web](https://github.com/MyScript/myscript-text-web). |
2 |
| -It helps you to integrate an ink editor and handwriting recognition in your **Polymer** webapp. |
3 |
| - |
4 |
| -## What is it about? |
| 1 | +# MyScript Common Element |
| 2 | +> The common layer of [myscript-math-web](https://github.com/MyScript/myscript-math-web) and [myscript-text-web](https://github.com/MyScript/myscript-text-web). |
| 3 | +
|
| 4 | +<div align="center"> |
| 5 | + <img src="preview.gif"> |
| 6 | +</div> |
| 7 | + |
| 8 | +`myscript-common-element` is a Web component that can be used in every web application to bring handwriting recognition and conversion. |
5 | 9 |
|
6 |
| -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: |
7 |
| -* Signal capture, |
| 10 | +It integrates all you need: |
| 11 | +* Signal capture for all devices, |
8 | 12 | * Digital ink rendering,
|
9 |
| -* Rich editing gestures, |
10 |
| -* Conversion, |
11 |
| -* Import, |
12 |
| -* Exports. |
| 13 | +* Link to MyScript Cloud to bring handwriting recognition. |
13 | 14 |
|
14 |
| -Both math and text can be recognized, you just have to define the appropriate configuration settings. |
| 15 | +If you are not familiar with [Web components](https://www.webcomponents.org/) and [Polymer](https://www.polymer-project.org/), please consider using [MyScriptJS](https://github.com/MyScript/MyScriptJS) or our out-of-the-box components [myscript-math-web](https://github.com/MyScript/myscript-math-web) and [myscript-text-web](https://github.com/MyScript/myscript-text-web). |
15 | 16 |
|
16 |
| -If you are not familiar with webcomponents and Polymer, please use [MyScriptJS](https://github.com/MyScript/MyScriptJS) or [myscript-math-web](https://github.com/MyScript/myscript-math-web) and [myscript-text-web](https://github.com/MyScript/myscript-text-web). |
| 17 | +## Table of contents |
17 | 18 |
|
18 |
| -## Getting started |
| 19 | +* [Examples](https://github.com/MyScript/myscript-common-element#examples) |
| 20 | +* [Features](https://github.com/MyScript/myscript-common-element#features) |
| 21 | +* [Requirements](https://github.com/MyScript/myscript-common-element#requirements) |
| 22 | +* [Installation](https://github.com/MyScript/myscript-common-element#installation) |
| 23 | +* [Usage](https://github.com/MyScript/myscript-common-element#usage) |
| 24 | +* [Documentation](https://github.com/MyScript/myscript-common-element#documentation) |
| 25 | +* [Support](https://github.com/MyScript/myscript-common-element#support) |
| 26 | +* [Feedback](https://github.com/MyScript/myscript-common-element#sharing-your-feedback) |
| 27 | +* [Contributing](https://github.com/MyScript/myscript-common-element#contributing) |
19 | 28 |
|
20 |
| -### Prerequisites |
| 29 | +## Examples |
21 | 30 |
|
22 |
| -1. Have a MyScript developer account. You can create one [here](https://dev.myscript.com/). |
23 |
| -2. Get an application key and HMAC key for your application. |
24 |
| -3. Import webcomponents polyfill on your webapp. |
| 31 | +If you're not familiar with MyScript and Interactive Ink, consider discovering its major features with our [text demo and tutorial](http://webdemo.myscript.com/views/text.html). |
25 | 32 |
|
26 |
| -```html |
27 |
| - <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> |
28 |
| -``` |
| 33 | +You can find on our examples page a [simple text example](https://myscript.github.io/myscript-common-element/components/myscript-common-element/#/elements/myscript-common-element/demos/get-started-[v4]) of `myscript-common-element`. |
| 34 | + |
| 35 | +We also provide several examples to show the features of `myscript-common-element`. Those examples can be found on our [examples page](https://myscript.github.io/myscript-common-element/components/myscript-common-element/#/elements/myscript-common-element/demos/other-demonstrations) with the source codes in [this directory](https://github.com/MyScript/myscript-common-element/tree/master/examples). |
| 36 | + |
| 37 | +## Features |
| 38 | + |
| 39 | +* Easy to integrate, |
| 40 | +* Digital ink capture and rendering, |
| 41 | +* Rich editing gestures, |
| 42 | +* Import and export content, |
| 43 | +* Styling, |
| 44 | +* Typeset support, |
| 45 | +* More than 200 mathematical symbols supported, |
| 46 | +* 59 supported languages. |
| 47 | + |
| 48 | +You can discover all the features on our Developer website for [Text](https://developer.myscript.com/text) and [Math](https://developer.myscript.com/math). |
| 49 | + |
| 50 | +## Requirements |
| 51 | + |
| 52 | +1. Have [bower](https://bower.io/#install-bower) installed. |
| 53 | +2. Have a MyScript developer account. You can create one [here](https://dev.myscript.com/). |
| 54 | +3. Get your keys and the free monthly quota to access MyScript Cloud at [developer.myscript.com](https://developer.myscript.com/getting-started/web) |
29 | 55 |
|
30 |
| -#### Installation |
| 56 | +## Installation |
31 | 57 |
|
32 | 58 | 1. Download myscript-common-element.
|
33 | 59 | ```shell
|
34 | 60 | bower install myscript-common-element
|
35 | 61 | ```
|
36 | 62 |
|
37 |
| -2. Create and edit `index.html` file in the same directory. Add the following line in the `head` section to import the library. |
| 63 | +## Usage |
| 64 | + |
| 65 | +1. Create an `index.html` file in the same directory. |
| 66 | + |
| 67 | +2. Add the following lines in the `head` section to import the library and the webcomponents polyfill. |
38 | 68 | ```html
|
39 |
| - <!-- Load the webcomponent polyfill --> |
40 |
| - <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> |
41 |
| - <!-- Load myscript-common-element and the related librairies --> |
42 | 69 | <link rel="import" href="bower_components/myscript-common-element/myscript-common-element.html">
|
| 70 | + <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> |
| 71 | +``` |
| 72 | + |
| 73 | +3. Still in the `head` section, add the following style: |
| 74 | +```html |
| 75 | +<style> |
| 76 | + myscript-common-element { |
| 77 | + height: 100%; |
| 78 | + } |
| 79 | +</style> |
43 | 80 | ```
|
44 | 81 |
|
45 |
| -3. Use the component in the `body` section. Use the keys you received by mail. |
| 82 | +4. Use the component in the `body` section with the keys you received by mail. |
46 | 83 | ```html
|
47 | 84 | <myscript-common-element
|
48 |
| - applicationkey="YOUR MYSCRIPT CDK APPLICATION KEY" |
49 |
| - hmackey="YOUR MYSCRIPT CDK HMAC KEY"> |
| 85 | + applicationkey="YOUR MYSCRIPT DEVELOPER APPLICATION KEY" |
| 86 | + hmackey="YOUR MYSCRIPT DEVELOPER HMAC KEY"> |
50 | 87 | </myscript-common-element>
|
51 | 88 | ```
|
52 | 89 |
|
53 |
| -4. Launch a local web-server and use it! |
54 |
| - |
55 |
| - |
56 |
| -## Examples |
| 90 | +5. Your `index.html` file should look like this: |
| 91 | +```html |
| 92 | +<html> |
| 93 | + <head> |
| 94 | + <link rel="import" href="bower_components/myscript-common-element/myscript-common-element.html"> |
| 95 | + <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> |
| 96 | + <style> |
| 97 | + myscript-common-element { |
| 98 | + height: 100%; |
| 99 | + } |
| 100 | + </style> |
| 101 | + </head> |
| 102 | + <body> |
| 103 | + <myscript-common-element |
| 104 | + applicationkey="YOUR MYSCRIPT DEVELOPER APPLICATION KEY" |
| 105 | + hmackey="YOUR MYSCRIPT DEVELOPER HMAC KEY"> |
| 106 | + </myscript-common-element> |
| 107 | + </body> |
| 108 | +</html> |
| 109 | +``` |
57 | 110 |
|
58 |
| -Browse [the examples hosted on github.io](https://myscript.github.io/myscript-common-element/components/myscript-common-element/#/elements/myscript-common-element/demos/other-demonstrations). |
| 111 | +6. Launch a local Web server like the one below and open the page in your browser (at [0.0.0.0:8000](http://0.0.0.0:8000) if you used the one below) to start using it! |
| 112 | +``` |
| 113 | +python -m SimpleHTTPServer |
| 114 | +``` |
59 | 115 |
|
60 |
| -The [directory examples/](/examples) of this git repository contains all the example source codes. |
| 116 | +You can find this guide and a more complete example on the [MyScript Developer website](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/). |
61 | 117 |
|
62 | 118 | ## Documentation
|
63 | 119 |
|
64 |
| -A complete guide is available on [MyScript Developer website](https://developer.myscript.com/docs/interactive-ink/1.0/web/web-components/common-element/). |
| 120 | +You can find a complete documentation with the following sections on our Developer website: |
| 121 | + |
| 122 | +* **Get Started**: [how to use myscript-common-element with a full example](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/get-started/), |
| 123 | +* **Editing**: [how to interact with content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/editing/), |
| 124 | +* **Conversion**: [how to convert your handwritten content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/conversion/), |
| 125 | +* **Import and Export**: [how to import and export your content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/import-and-export/), |
| 126 | +* **Styling**: [how to style content](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/common-element/styling/). |
65 | 127 |
|
66 |
| -The API Reference is available in the `docs` directory or on [myscript.github.io/myscript-common-element/ website](https://myscript.github.io/myscript-common-element/). |
| 128 | +We also provide a complete [API Reference](https://myscript.github.io/myscript-common-element/). |
67 | 129 |
|
68 |
| -## Contribute |
| 130 | +## Getting support |
69 | 131 |
|
70 |
| -We welcome your contributions: |
71 |
| -If you would like to extend myscript-common-element for your needs, feel free to fork it! |
72 |
| -Please sign our [Contributor License Agreement](CONTRIBUTING.md) before submitting your pull request. |
| 132 | +You can get support and ask your questions on the [dedicated section](https://developer-support.myscript.com/support/discussions/forums/16000096021) of MyScript Developer website. |
73 | 133 |
|
74 |
| -## Share your feedback |
| 134 | +## Sharing your feedback |
75 | 135 |
|
76 |
| -Made a cool app with myscript-common-element? We would love to hear about you! |
| 136 | +Made a cool app with `myscript-common-element`? We would love to hear about you! |
77 | 137 | We’re planning to showcase apps using it so let us know by sending a quick mail to [[email protected]](mailto://[email protected])
|
| 138 | + |
| 139 | +## Contributing |
| 140 | + |
| 141 | +We welcome your contributions: if you would like to extend `myscript-common-element` for your needs, feel free to fork it! |
| 142 | + |
| 143 | +Please take a look at our [contributing](CONTRIBUTING.md) guidelines before submitting your pull request. |
| 144 | + |
| 145 | +## License |
| 146 | +This library is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0). |
0 commit comments