Configuration

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.

To get the exhaustive list of options:

You can access the configuration during the creation of an editor. Refer to the iinkTS GetStarted 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: '...'
    }
  }
}

Content type compatibility

The supported content types depends on the protocol you are using. The table below should help you.

Recognition type
Protocol : WebsocketBy default onscreen mode is active and possible values are MATH or TEXT. It is possible to activate offscreen mode by setting the offscreen parameter to true. See iinkTS Offscreen interactivity. In offscreen mode a Raw Content type is used.
Protocol : RESTPossible values are MATH, TEXT, DIAGRAM, Raw Content.

Server parameters

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

KeyTypeDefault valueDescription
server.protocolstringWEBSOCKETREST or WEBSOCKET to choose the API to use.
server.schemestringhttpsServer URL scheme (http/https)
server.hoststringcloud.myscript.comServer host (cloud.myscript.com is the production url, webdemoapi.myscript.com is reserved for demonstration purpose)
server.applicationKeystringundefinedMyScript Cloud applicationKey
server.hmacKeystringundefinedMyScript Cloud hmacKey
server.websocket.pingEnabledbooleantrueEnable/disable ping checks of the network connectivity (Improve network stability when enable)
server.websocket.pingDelaynumber30000Delay 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.maxPingLostCountnumber10Failed ping count before closing the socket
server.websocket.autoReconnectbooleantrueWill 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.maxRetryCountnumber2Number of retries when auto reconnect is enabled
server.websocket.fileChunkSizenumber300000File chunk size in bytes

Recognition parameters

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

Common parameters

KeyTypeDefault valueDescription
recognition.typestringTEXT"TEXT" , "MATH" , "DIAGRAM" or "Raw Content"
recognition.gesture.enablebooleantrueIf true, iink SDK will attempt to detect gestures while writing.
recognition.langstringen_USDefines the language used in the editor.
recognition.export.image-resolutionnumber300Resolution of the images that are exported, in dpi.
recognition.export.jiix.bounding-boxbooleanfalseIf true, JIIX export will contain the bounding boxes of exported items.
recognition.export.jiix.strokesbooleanfalseIf true, JIIX export will include the detailed ink information.
recognition.export.jiix.stylebooleanfalseIf true, JIIX export will include the styling information.
recognition.export.jiix.text.charsbooleanfalseIf true, JIIX export will include the detailed characters information.
recognition.export.jiix.text.wordsbooleantrueIf true, JIIX export will include the detailed words information.
recognition.alwaysConnectedbooleantruePrevents the WebSocket session to be reinitialized every 5 minutes.
recognition.renderer.debug.draw-image-boxesbooleanfalseIf true, displays the bounding of the images.
recognition.renderer.debug.draw-text-boxesbooleanfalseIf true, displays the bounding of the words (for text) or characters (for math).

Text recognition parameters

KeyTypeDefault valueDescription
recognition.text.guides.enablebooleantrueIf 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-preciselybooleanfalseIf false, the eraser removes any character it touches, else it only erases ink portions within its trajectory.
recognition.text.mimeTypesarray 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.bottomnumber10Margin from the bottom of the part to the bottom of the text bounding box (used for reflow).
recognition.text.margin.leftnumber10Margin from the left of the part to the left of the text bounding box (used for reflow).
recognition.text.margin.rightnumber10Margin from the right of the part to the right of the text bounding box (used for reflow).
recognition.text.margin.topnumber20Margin from the top of the part to the top of the text bounding box (used for reflow).
recognition.text.customResourcesarray of strings[]Name of the custom resources uploaded in the developer space to use. See Custom recognition reference documentation
recognition.text.customLexiconarray of strings[]List of custom words to be added to the recognition capabilities. See more about the lexicon.
recognition.text.addLKTextbooleantrueChoice 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

KeyTypeDefault valueDescription
recognition.math.eraser.erase-preciselybooleanfalseIf false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
recognition.math.mimeTypesarray 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.bottomnumber10Margin from the bottom of the part to the top of the math expression bounding box (used for conversion operations)
recognition.math.margin.leftnumber15Margin from the left of the part to the left of the math expression bounding box (used for conversion operations)
recognition.math.margin.rightnumber15Margin from the right of the part to the right of the math expression bounding box (used for conversion operations)
recognition.math.margin.topnumber10Margin from the top of the part to the top of the math expression bounding box (used for conversion operations)
recognition.math.solver.angle-unitstringdegUnit of the angle computation in the solver: It must be either deg (degrees) or rad (radians)
recognition.math.solver.decimal-separatorstring.The decimal separator symbol (usually . or ,).
recognition.math.solver.enablebooleantrueIf true, displays solver result upon conversion.
recognition.math.solver.fractional-part-digitsnumber3The number of decimals to display in solver computation result.
recognition.math.solver.rounding-modestringhalf upRounding method used display solver results: It must be either half up or truncate.
recognition.math.customGrammarIdstringundefinedName of the custom grammar uploaded in the developer space to use. See Custom recognition reference documentation.
recognition.math.customGrammarContentstringundefinedCustom math grammar text. See reference documentation to know how to build your custom grammar.

Diagram recognition parameters

KeyTypeDefault valueDescription
recognition.diagram.eraser.erase-preciselybooleanfalseIf false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
recognition.diagram.mimeTypesarray of string['application/vnd.myscript.jiix']Exported mimeTypes. Other possible value is 'application/vnd.openxmlformats-officedocument.presentationml.presentation'.

Raw Content recognition parameters

KeyTypeDefault valueDescription
recognition.raw-content.eraser.erase-preciselybooleanfalseIf false, the eraser removes any symbol it touches, else it only erases ink portions within its trajectory.
raw-content.recognition.typesarray of strings[]Defines the type of recognition that will be performed on this content and the result that will be available in the JIIX export. Possible values are text and shape.
recognition.raw-content.gesturesarray 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

KeyTypeDefault valueDescription
grabber.listenerOptions.capturebooleantruecapture option when adding event listeners with addEventListener function
grabber.listenerOptions.passivebooleanfalsepassive option when adding event listeners with addEventListener function
grabber.xyFloatPrecisionnumber0Precision 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.timestampFloatPrecisionnumber0Precision of the timestamp
rendering.minHeightnumber100Minimal height of the editor
rendering.minWidthnumber100Minimal width of the editor
rendering.smartGuide.enablebooleantrueEnable the smart guide
rendering.smartGuide.fadeOut.enablebooleanfalseEnable/Disable the smart guide fade out animation
rendering.smartGuide.fadeOut.durationnumber10000Time in milliseconds to hide the smart guide
triggers.resizeTriggerDelaynumber200Delay 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.exportContentstringPOINTER_UPTrigger for export action: either on POINTER_UP when export is triggers after a delay after pointer up, or DEMAND for on demand export.
triggers.exportContentDelaynumber200When triggers.exportContent is POINTER_UP sets the delay in millisecond to wait after pen pu, before triggering the export action.
events.processDelaynumber0Quiet period duration in millisecond while editor wait for another event before triggering events

Offscreen mode parameters

These parameters are specific to the WebSocket offscreen mode. For more details refer to iinkTS Offscreen interactivity.

KeyTypeDefault valueDescription
rendering.guides.enablebooleantrueIndicates whether alignment guides should be shown.
rendering.guides.gapnumber50When guides are enabled, defines the gap of the guides .
rendering.guides.typestringpointWhen guides are enabled, describes which alignment guides should be shown. Possible values are: line, grid or point.
menu.enablebooleantrueIndicates whether the menu bar should be shown.
menu.style.enablebooleantrueIndicates whether the style menu should be shown.
menu.intention.enablebooleantrueIndicates whether the intention menu should be shown.
menu.action.enablebooleantrueIndicates whether the action menu should be shown.
menu.context.enablebooleantrueIndicates whether the context menu should be shown on selection.