Migration guide
This page lists the key points to pay attention to when migrating existing code to the 3.2 MyScript iink Cloud APIs.
iinkTS changes
Supporting the new REST endpoint has required some refactoring of our Javascript library. As a result, we have updated iinkTS from 2.0.1 to 3.0.0. This section describes the iinkTS main updates that might impact your application code when upgrading to iinkTS 3.0.0.
Editor refactoring
The Editor class has been replaced by dedicated editors. For easy integration, each editor type comes with a configuration object that sets its relevant default configuration. There is a new Editor class that helps to instantiate the right Editor according to its type and additional configuration options. The editor type in the table below corresponds to the type used when creating the editor with the Editor load method.
| Editor | Editor type | Editor configuration object | Recognition type possible values | Protocol |
|---|---|---|---|---|
InteractiveInkEditor | INTERACTIVEINK | InteractiveInkEditorConfiguration | Raw Content | Websocket |
InteractiveInkSSREditor | INTERACTIVEINKSSR | InteractiveInkSSREditorConfiguration | MATH or TEXT | Websocket |
InkEditor | INKV2 | InkEditorConfiguration | MATH, TEXT, SHAPE or Raw Content | REST |
InkEditorDeprecated | INKV1 | InkEditorDeprecatedConfiguration | MATH, TEXT, DIAGRAM or Raw Content | REST |
Consequently, the options.configuration.protocol option has been suppressed since it is now useless.
➤ For more details on editors, see the iinkTS editing section.
Configuration and options refactoring
- We have renamed the following keys:
| Old key name | New key name |
|---|---|
options.configuration.rendering.smartGuide.xxx | options.configuration.smartGuide.xxx |
options.penStyle | options.configuration.penStyle |
options.theme | options.configuration.theme |
options.behaviors | options.override |
- For clarity, since some configuration options are static, it is no longer possible to change the configuration of an existing editor: you must now create (or load) a new editor to use an updated configuration.
Other changes
- To use a custom CSS class to style the size and the background and your editor, you must now use the
options.override.cssClasswhen creating your editor to override the default cssClass. For more details see the styling page. - The
LoggerClassenum has been renamedLoggerCategory.
➤ For more details, see the iinkTS reference documentation