Migrate from 1.4

This page lists the key points to pay attention to when migrating existing code from iink SDK 1.4 to the new iink SDK 1.5.

You are recommended to use the latest recognition resource packs to benefit from the latest improvements made to MyScript technology.

API updates

IEditorListener refactoring

To improve error management, the method onError has been modified to include a new argument that gives the error code corresponding to the Editor error. In addition, new ink gestures errors have been added.

➤ In Objective-C: you should modify your IEditorListener implementation if you want to use this new parameter into the onError method.

➤ In java and C#, for the sake of clarity, we have decided to take advantage of this update to merge the legacy IEditorListener and IEditorListener2 interfaces into a single one. So, you should modify your implementation to add this new parameter into the onError signature, and refactor your code to use the new IEditorListener. If you were using IEditorListener, this means adding the selectionChanged and activeBlockChanged methods coming from IEditorListener2. If you were implementing IEditorListener2, you should update the interface name and your imports to use IEditorListener.

JIIX format evolution

Version incremented from 2 to 3

The JIIX format has been updated to version 3. This allowed the inclusion of new information. If you were parsing JIIX output, you will have to update your parser code to follow the (small) evolutions that came with this new version.

Interactive Ink SDK 1.5 can only import JIIX version 3 documents. In the unlikely event you would like to import JIIX files generated by previous versions of the toolkit, you will have to migrate their content by yourself.

Key changes

  • The character object now includes a candidates array that contains the list of recognition candidates associated with this character.
  • The label property of diagram item of type Node has been renamed label-element.
  • For raw content and diagram item blocks, the id value has evolved with the addition of a prefix identifying their parents.

  • For drawing blocks containing images, an image object has been added.
  • For text blocks, a new object structure is available with the export.jiix.text.structure configuration.
  • By default, the linebreaks object is no more present. If you want to have information about the line breaks, we recommend you using the new structure object. If you still want to use the deprecated linebreaks object, you might though prefer to use the export.jiix.deprecated.text.linebreaks property instead.

JIIX reference (updated to version 3)

Eraser settings

  • Eraser settings have changed for "Text Document", "Raw Content" and "Drawing": erase-precisely replaces erase-entire-strokes.

  • The default behavior remains unchanged for "Raw Content" and "Drawing": by default the erase-precisely is true, ie the eraser only erases ink portions within its trajectory. This corresponds to the previous erase-entire-strokes false value. So if you were using the default values, you don’t have anything to do. But if you have customised the erase-entire-strokes value, make sure to update your application with the new erase-precisely setting.

  • For "Text Document", the behavior is now identical for all types of blocks: eraser precision default level is the object or groups of objects (stroke, character, …). Precision change applies to all blocks of a "Text Document" with the erase-precisely property. The drawing.erase-entire-strokes has been withdrawn, so it is no more possible to have for example “stroke” precision on "Text" blocks and “precise” precision on "Drawing" blocks.

Shape recognition feedback

  • By default the diagram shape recognition feedback is activated but there is no .diagram-fill styling class pen fill color. So if you want to keep the same blue background shape coloring as with previous version, you should set the following theme:
  • With iink 1.4, the setting that was used for enabling the shape recognition feedback in a Raw Content part was raw-content.feedback.fill-shape which has been replaced by the new one raw-content.recognition.feedback. The latter proposes more options. By default, there is no feedback which was already the case with iink 1.4. So, if you had not modified this setting, you don’t have anything to do. But if you had enabled it, you should modify your code to use the new setting. For further details on how to do it, please refer to the configuration and styling pages.

Other changes

diagram.enable-sub-blocks property splitting

Up to the 1.4 version, the diagram.enable-sub-blocks property was used to control whether sub blocks were accessible in either Diagram parts or Diagram or Raw Content blocks of Text Document parts. In 1.5 we introduce a new property text-document.enable-sub-blocks to control sub-block access for blocks within Text Document parts. Thus, the diagram.enable-sub-blocks property now only applies to Diagram parts. By default, both properties remain true. So, if you had disabled the diagram.enable-sub-blocks property and are using Text Document parts, make sure to set the text-document.enable-sub-blocks to false.

Stroke text highlight styling change

The default styling -myscript-text-decoration-style applied when drawing a frame around some stroke text has changed. It used to be an outline frame around the text. In 1.5, it is a background color decoration that highlights the text. So, if you want to keep the same behavior as the 1.4 default one, you should set the following theme:


In addition, in 1.4 the highlight color was the pen color with alpha except for some predefined colors like black that led to a yellow highlight. In 1.5 there is no more exception: the highlight color is always the pen color with alpha.

Undo/redo mode standardization

The undo/redo behavior has been standardized and is now based on strokes for all Content Types.

We use cookies to ensure that we give you the best experience on our website Read the privacy policy