MyScript iink SDK is a flexible toolkit, and its default configuration can be adjusted to meet different needs. This page lists available options, their default values and usage.
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 content types depends on the protocol you are using. The table below should help you.
Recognition type | |
---|---|
Protocol : Websocket
|
MATH, TEXT |
Protocol : REST
|
MATH, TEXT, DIAGRAM, Raw Content |
Key | Type | Default value | Description |
---|---|---|---|
server.protocol |
string | WEBSOCKET |
REST or WEBSOCKET to choose the API to use. |
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 | 2 | File chunk size in bytes |
Key | Type | Default value | Description |
---|---|---|---|
recognition.type |
string | TEXT |
MATH, TEXT, DIAGRAM, Raw Content |
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). |
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. |
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. |
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 ’. |
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. |
recognition.raw-content.mimeTypes |
array of string | ['application/vnd.myscript.jiix'] |
Exported mimeType. |
recognition.raw-content.recognition.text |
boolean | ['application/vnd.myscript.jiix'] |
Exported mimeType. |
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 | |
rendering.smartGuide.enable |
boolean | true |
Enable the smart guide | |
rendering.smartGuide.fadeOut.enable |
boolean | false |
Enable/Disable the smart guide fade out animation | |
rendering.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 |