iinkTS is a flexible toolkit, and its default configuration can be adjusted to meet different needs. This page lists main available options, their default values and usage.

You can access the configuration during the creation of an editor. Refer to the iinkTS Editing page of the guide for more instructions.

General

For the sake of clarity, path of parameter are given. For example recognition.type key matches following entry in the configuration :

const options = {
  configuration: {
    recognition: {
      type: '...'
    }
  }
}

The supported relevant configuration options depend on the editor you are using. For easy integration, each editor type comes with a configuration object that sets its relevant configuration options. The editor type corresponds to the type used when creating the editor with the Editor load method.

The supported recognition type and protocol depend on the editor type too.

The table below should help you.

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

Server parameters

Server parameters are related to the communication with the recognition server.

Key Type Default value Description
server.scheme string https Server URL scheme (http/https)
server.host string cloud.myscript.com Server host (cloud.myscript.com is the production url, webdemoapi.myscript.com is reserved for demonstration purpose)
server.applicationKey string undefined MyScript Cloud applicationKey
server.hmacKey string undefined MyScript Cloud hmacKey
server.websocket.pingEnabled boolean true Enable/disable ping checks of the network connectivity (Improve network stability when enable)
server.websocket.pingDelay number 30000 Delay in millisecond to wait before sending a ping. A ping is sent if no exchange occurs between the browser and teh server since last ping.
server.websocket.maxPingLostCount number 10 Failed ping count before closing the socket
server.websocket.autoReconnect boolean true Will try to automatically reconnect when websocket is close or when a timeout is detected. Do not handle the case when user change network on his device.
server.websocket.maxRetryCount number 2 Number of retries when auto reconnect is enabled
server.websocket.fileChunkSize number 300000 File chunk size in bytes

Recognition parameters

Recognition parameters are related the parameters of the recognition engine on the server.

Common parameters

Key Type Default value Description
recognition.type string TEXT “TEXT” , “MATH” , “DIAGRAM”, “SHAPE or “Raw Content” according to editor.
recognition.gesture.enable boolean true If true, iink SDK will attempt to detect gestures while writing.
recognition.lang string en_US Defines the language used in the editor.
recognition.export.image-resolution number 300 Resolution of the images that are exported, in dpi.
recognition.export.jiix.bounding-box boolean false If true, JIIX export will contain the bounding boxes of exported items.
recognition.export.jiix.strokes boolean false If true, JIIX export will include the detailed ink information.
recognition.export.jiix.style boolean false If true, JIIX export will include the styling information.
recognition.export.jiix.text.chars boolean false If true, JIIX export will include the detailed characters information.
recognition.export.jiix.text.words boolean true If true, JIIX export will include the detailed words information.
recognition.alwaysConnected boolean true Prevents the WebSocket session to be reinitialized every 5 minutes.
recognition.renderer.debug.draw-image-boxes boolean false If true, displays the bounding of the images.
recognition.renderer.debug.draw-text-boxes boolean false If true, displays the bounding of the words (for text) or characters (for math).

Text recognition parameters

Key Type Default value Description
recognition.text.guides.enable boolean true If true, guides are displayed and used for convert and reflow operations. The default line spacing is 10 mm and can be tuned by choosing the .text class font-size and line-height values.
recognition.text.eraser.erase-precisely boolean false If false, the eraser removes any character it touches, else it only erases ink portions within its trajectory.
recognition.text.mimeTypes array of strings ['application/vnd.myscript.jiix'] Exported mimeTypes. Possible values are 'text/plain’ and 'application/vnd.myscript.jiix’. When Smart Guide is enable 'application/vnd.myscript.jiix' is mandatory.
recognition.text.margin.bottom number 10 Margin from the bottom of the part to the bottom of the text bounding box (used for reflow).
recognition.text.margin.left number 10 Margin from the left of the part to the left of the text bounding box (used for reflow).
recognition.text.margin.right number 10 Margin from the right of the part to the right of the text bounding box (used for reflow).
recognition.text.margin.top number 20 Margin from the top of the part to the top of the text bounding box (used for reflow).
recognition.text.customResources array of strings [] Name of the custom resources uploaded in the developer space to use. See Custom recognition reference documentation
recognition.text.customLexicon array of strings [] List of custom words to be added to the recognition capabilities. See more about the lexicon.
recognition.text.addLKText boolean true Choice to add to the configured custom resources, words in the lexicon of the current language. Note that, if set to false, only one word will be recognized from the inks you send.

Math recognition parameters

Key Type Default value Description
recognition.math.eraser.erase-precisely boolean false If false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
recognition.math.mimeTypes array of string ['application/vnd.myscript.jiix'] Exported mimeTypes. Other possible values are 'application/x-latex’ and 'application/mathml+xml’. 'application/x-latex' is mandatory when export zone is active.
recognition.math.margin.bottom number 10 Margin from the bottom of the part to the top of the math expression bounding box (used for conversion operations)
recognition.math.margin.left number 15 Margin from the left of the part to the left of the math expression bounding box (used for conversion operations)
recognition.math.margin.right number 15 Margin from the right of the part to the right of the math expression bounding box (used for conversion operations)
recognition.math.margin.top number 10 Margin from the top of the part to the top of the math expression bounding box (used for conversion operations)
recognition.math.solver.angle-unit string deg Unit of the angle computation in the solver: It must be either deg (degrees) or rad (radians)
recognition.math.solver.decimal-separator string . The decimal separator symbol (usually . or ,).
recognition.math.solver.enable boolean true If true, displays solver result upon conversion.
recognition.math.solver.fractional-part-digits number 3 The number of decimals to display in solver computation result.
recognition.math.solver.rounding-mode string half up Rounding method used display solver results: It must be either half up or truncate.
recognition.math.customGrammarId string undefined Name of the custom grammar uploaded in the developer space to use. See Custom recognition reference documentation.
recognition.math.customGrammarContent string undefined Custom math grammar text. See reference documentation to know how to build your custom grammar.

Diagram recognition parameters

Key Type Default value Description
recognition.diagram.eraser.erase-precisely boolean false If false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
recognition.diagram.mimeTypes array of string ['application/vnd.myscript.jiix'] Exported mimeTypes. Other possible value is 'application/vnd.openxmlformats-officedocument.presentationml.presentation’.

Raw Content recognition parameters

Key Type Default value Description
recognition.raw-content.eraser.erase-precisely boolean false If false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
raw-content.recognition.types array of strings ["text", "shape"] Defines the types of recognition that will be performed on this content and the result that will be available in the JIIX export. Possible values are text, math, shape and drawing.
raw-content.classification.types array of strings ["text", "shape"] Defines the types of classification that will be performed on this content and the result that will be available in the JIIX export. Possible values are text, math, and shape.
recognition.raw-content.gestures array of strings ["underline", "scratch-out", "join", "insert", "strike-through", "surround"] A string array containing any of the enabled gestures: {scratch-out, underline, insert, join, strike-through, surround}. By default, all gestures are enabled.

Client parameters

These parameters allow to tune the client side.

Common parameters

Key Type Default value Description
grabber.listenerOptions.capture boolean true capture option when adding event listeners with addEventListener function
grabber.listenerOptions.passive boolean false passive option when adding event listeners with addEventListener function
grabber.xyFloatPrecision number 0 Precision of x and y from 0 to 10 (integer). The higher the value, the more precise will be the point capture but object in memory and sent to the server will be heavier.
grabber.timestampFloatPrecision number 0 Precision of the timestamp
rendering.minHeight number 100 Minimal height of the editor
rendering.minWidth number 100 Minimal width of the editor
smartGuide.enable boolean true Enable the smart guide
smartGuide.fadeOut.enable boolean false Enable/Disable the smart guide fade out animation
smartGuide.fadeOut.duration number 10000 Time in milliseconds to hide the smart guide
triggers.resizeTriggerDelay number 200 Delay in millisecond to wait before applying a resize action. If another resize order is performed during the quiet period, resizeTimer is clear. Prevent resize storms.
triggers.exportContent string POINTER_UP Trigger for export action: either on POINTER_UP when export is triggers after a delay after pointer up, or DEMAND for on demand export.
triggers.exportContentDelay number 200 When triggers.exportContent is POINTER_UP sets the delay in millisecond to wait after pen pu, before triggering the export action.
events.processDelay number 0 Quiet period duration in millisecond while editor wait for another event before triggering events

InteractiveInkEditor specific parameters

These parameters are specific to the InteractiveInkEditor. For more details refer to iinkTS Offscreen interactivity.

Key Type Default value Description
rendering.guides.enable boolean true Indicates whether alignment guides should be shown.
rendering.guides.gap number 50 When guides are enabled, defines the gap of the guides .
rendering.guides.type string point When guides are enabled, describes which alignment guides should be shown. Possible values are: line, grid or point.
menu.enable boolean true Indicates whether the menu bar should be shown.
menu.style.enable boolean true Indicates whether the style menu should be shown.
menu.intention.enable boolean true Indicates whether the intention menu should be shown.
menu.action.enable boolean true Indicates whether the action menu should be shown.
menu.context.enable boolean true Indicates whether the context menu should be shown on selection.