# Global

##

### Members

#### (constant) CLOSE_RECOGNIZER_MESSAGE :String

Explicit close message

Source:
  - model/RecognizerContext.js, line 145

##### Type:

- `String`

#### (constant) defaultBehaviors :Behaviors

Default behaviors

Source:
  - configuration/DefaultBehaviors.js, line 36

##### Type:

- `Behaviors`

#### (constant) defaultConfiguration

Default configuration See https://developer.myscript.com/docs/interactive-ink/latest/reference/web/configuration/ for a full documentation of parameters.

Source:
  - configuration/DefaultConfiguration.js, line 8

#### (constant) defaultPenStyle :PenStyle

Default style

Source:
  - configuration/DefaultPenStyle.js, line 17

##### Type:

- `PenStyle`

#### (constant) defaultTheme :Theme

Default theme

Source:
  - configuration/DefaultTheme.js, line 34

##### Type:

- `Theme`

#### (constant) editorLogger :Object

Log editor events

Source:
  - configuration/LoggerConfig.js, line 15

##### Type:

- `Object`

#### (constant) eventLogger :Object

Log callback events

Source:
  - configuration/LoggerConfig.js, line 57

##### Type:

- `Object`

#### (constant) grabberLogger :Object

Log grabber events

Source:
  - configuration/LoggerConfig.js, line 36

##### Type:

- `Object`

#### (constant) iinkRestConfiguration :RecognizerInfo

Recognizer configuration

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 18

##### Type:

- `RecognizerInfo`

#### (constant) IinkWsConfiguration :RecognizerInfo

Recognizer configuration

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 40

##### Type:

- `RecognizerInfo`

#### (constant) log :Object

Main log instance

Source:
  - configuration/LoggerConfig.js, line 8

##### Type:

- `Object`

#### (constant) LOST_CONNEXION_MESSAGE :Object

Lost connection message

Source:
  - model/RecognizerContext.js, line 139

##### Type:

- `Object`

#### (constant) MathSymbols :Object

Source:
  - renderer/canvas/symbols/MathSymbolCanvasRenderer.js, line 8

##### Type:

- `Object`

#### (constant) modelLogger :Object

Log model events

Source:
  - configuration/LoggerConfig.js, line 29

##### Type:

- `Object`

#### (constant) recognizerLogger :Object

Log recognizer events

Source:
  - configuration/LoggerConfig.js, line 50

##### Type:

- `Object`

#### (constant) rendererLogger :Object

Log grabber events

Source:
  - configuration/LoggerConfig.js, line 43

##### Type:

- `Object`

#### (constant) ShapeSymbols :Object

Source:
  - renderer/canvas/symbols/ShapeSymbolCanvasRenderer.js, line 6

##### Type:

- `Object`

#### (constant) smartGuideLogger :Object

Log editor events

Source:
  - configuration/LoggerConfig.js, line 22

##### Type:

- `Object`

#### (constant) testLogger :Object

Log tests events

Source:
  - configuration/LoggerConfig.js, line 71

##### Type:

- `Object`

#### (constant) TextSymbols :Object

Source:
  - renderer/canvas/symbols/TextSymbolCanvasRenderer.js, line 7

##### Type:

- `Object`

#### (constant) utilLogger :Object

Log util events

Source:
  - configuration/LoggerConfig.js, line 64

##### Type:

- `Object`

### Methods

#### addListeners(editor, smartGuide)

Add the listeners to the smart guide elements.

Source:
  - smartguide/SmartGuide.js, line 236

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` | A reference to the editor.
`smartGuide` | `SmartGuide` | A reference to the smart guide.

#### addPoint(stroke, point) → {Stroke}

Mutate a stroke by adding a point to it.

Source:
  - model/StrokeComponent.js, line 96

##### Parameters:

Name | Type | Description
--- | --- | ---
`stroke` | `Stroke` | Current stroke
`point` | `Object` | Point to add

##### Returns:

Type:
  `Stroke`

Updated stroke

#### addStroke(model, stroke) → {Model}

Mutate the model given in parameter by adding the new strokeToAdd.

Source:
  - model/InkModel.js, line 107

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model
`stroke` | `Stroke` | Stroke to be added to pending ones

##### Returns:

Type:
  `Model`

Updated model

#### (async) addStrokes(editor, model, triggeropt) → {Promise}

Launch the recognition with all editor relative configuration and state.

Source:
  - Editor.js, line 61

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`model` | `Model` |  |
`trigger` | `String` | <optional> |

##### Returns:

Type:
  `Promise`

#### addStrokes(recognizerContext, model)

Add strokes to the model

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 425

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### addStrokeToGroup(model, stroke, strokePenStyle) → {Model}

Mutate the model given in parameter by adding the new strokeToAdd and the penstyle. Used for iink REST.

Source:
  - model/InkModel.js, line 122

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model
`stroke` | `Stroke` | Stroke to be added to pending ones
`strokePenStyle` | `PenStyle` |

##### Returns:

Type:
  `Model`

Updated model

#### addWebsocketAttributes(websocket, recognizerContext)

Attach all socket attributes helping managing server connexion

Source:
  - recognizer/websocket/networkWSInterface.js, line 24

##### Parameters:

Name | Type | Description
--- | --- | ---
`websocket` | `WebSocket` | Current WebSocket
`recognizerContext` | `RecognizerContext` |

#### appendToPendingStroke(model, point) → {Model}

Mutate the model by adding a point to the current pending stroke.

Source:
  - model/InkModel.js, line 179

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model
`point` | `Object` | Captured point to be append to the current stroke

##### Returns:

Type:
  `Model`

Updated model

#### attach(element, editor, offsetTopopt, offsetLeftopt) → {GrabberContext}

Listen for the desired events

Source:
  - grabber/PointerEventGrabber.js, line 69

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`element` | `Element` |  |  | DOM element to attach events listeners
`editor` | `Editor` |  |  | Editor to received down/move/up events
`offsetTop` | `Number` | <optional> | 0 |
`offsetLeft` | `Number` | <optional> | 0 |

##### Listens to Events:

- {Event} pointermove: a pointer moves,event: similar to touchmove or mousemove.
- {Event} pointerdown: a pointer is activated,event: or a device button held.
- {Event} pointerup: a pointer is deactivated,event: or a device button released.
- event:{Event} pointerover: a pointer has moved onto an element.
- event:{Event} pointerout: a pointer is no longer on an element it once was.
- event:{Event} pointerenter: a pointer enters the bounding box of an element.
- event:{Event} pointerleave: a pointer leaves the bounding box of an element.
- event:{Event} pointercancel: a pointer will no longer generate events.

##### Returns:

Type:
  `GrabberContext`

Grabber context

#### attach(element, minHeightopt, minWidthopt) → {Object}

Attach the renderer to the DOM element

Source:
  - renderer/canvas/CanvasRenderer.js, line 96

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`element` | `Element` |  |  | DOM element to attach the rendering elements
`minHeight` | `Number` | <optional> | 0 | Minimal height of the editor
`minWidth` | `Number` | <optional> | 0 | Minimal width of the editor

##### Returns:

Type:
  `Object`

The renderer context to give as parameter when a draw model will be call

#### attach(element) → {Object}

Populate the dom element

Source:
  - renderer/svg/SVGRenderer.js, line 21

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | `Element` | DOM element to attach the rendering elements

##### Returns:

Type:
  `Object`

The renderer context to give as parameter when a draw model will be call

#### buildHmacMessage()

A websocket dialog have this sequence : ---------- Client ------------------------------------- Server ---------------------------------- init (send the new content package) ================> <=========== hmacChallenge answerToHmacChallenge (send the hmac) =========> newPart (send the parameters ) ===============> <=========== update addStrokes (send the strokes ) ============> <=========== update

Source:
  - recognizer/websocket/WsBuilder.js, line 25

#### buildWebSocketCallback(destructuredPromise, recognizerContext) → {function}

This function bind the right behaviour when a message is receive by the websocket.

Source:
  - recognizer/websocket/WsBuilder.js, line 38

##### Parameters:

Name | Type | Description
--- | --- | ---
`destructuredPromise` | `DestructuredPromise` |
`recognizerContext` | `RecognizerContext` | Current recognizer context

##### Returns:

Type:
  `function`

Callback to handle WebSocket results

#### callFadeOutObserver(durationopt, smartGuide)

Call mutation observer to trigger fade out animation.

Source:
  - smartguide/SmartGuide.js, line 260

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`duration` | `number` | <optional> | 10000 | the duration in milliseconds before calling the fade out animation.
`smartGuide` | `SmartGuide` |  |  | A reference to the smart guide.

#### canReconnect(recognizerContext) → {Boolean}

Test if it is possible to reconnect

Source:
  - model/RecognizerContext.js, line 121

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` |

##### Returns:

Type:
  `Boolean`

True if possible, false otherwise

#### clear(recognizerContext, model) → {Promise}

Clear server context. Currently nothing to do there.

Source:
  - recognizer/DefaultRecognizer.js, line 102

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

##### Returns:

Type:
  `Promise`

#### clear(recognizerContext, model, callback)

Do what is needed to clean the server context.

Source:
  - recognizer/websocket/WsRecognizerUtil.js, line 96

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model
`callback` | `RecognizerCallback` |

#### clear(recognizerContext, model)

Clear action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 453

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### clearModel(model) → {Model}

Clear the model.

Source:
  - model/InkModel.js, line 77

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model

##### Returns:

Type:
  `Model`

Cleared model

#### clickCandidate(evt, editor, smartGuide)

Call the import_ function of the editor to import the modified Jiix with the new label.

Source:
  - smartguide/SmartGuide.js, line 217

##### Parameters:

Name | Type | Description
--- | --- | ---
`evt` | `Event` | Event to determine the clicked candidate.
`editor` | `Editor` | A reference to the editor.
`smartGuide` | `SmartGuide` | A reference to the smart guide.

#### cloneModel(model) → {Model}

Clone model

Source:
  - model/InkModel.js, line 329

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model

##### Returns:

Type:
  `Model`

Clone of the current model

#### close(recognizerContext, model) → {Promise}

Close and free all resources that will no longer be used by the recognizer.

Source:
  - recognizer/DefaultRecognizer.js, line 121

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

##### Returns:

Type:
  `Promise`

#### close(recognizerContext, model)

Close and free all resources that will no longer be used by the recognizer.

Source:
  - recognizer/websocket/WsRecognizerUtil.js, line 119

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` |
`model` | `Model` |

#### close(recognizerContext, code, reason)

Close the websocket

Source:
  - recognizer/websocket/networkWSInterface.js, line 109

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`code` | `Number` | Exit code
`reason` | `String` | Exit reason

#### computeAxeAngle(begin, end) → {Number}

Source:
  - renderer/QuadraticUtils.js, line 43

##### Parameters:

Name | Type | Description
--- | --- | ---
`begin` | `Object` |
`end` | `Object` |

##### Returns:

Type:
  `Number`

#### computeHmac(input, applicationKey, hmacKey) → {String}

Compute HMAC signature for server authentication

Source:
  - recognizer/CryptoHelper.js, line 13

##### Parameters:

Name | Type | Description
--- | --- | ---
`input` | `Object` | Input data to compute HMAC
`applicationKey` | `String` | Current applicationKey
`hmacKey` | `String` | Current hmacKey

##### Returns:

Type:
  `String`

Signature

#### computeLinksPoints(point, angle, width) → {Object|Object}

Source:
  - renderer/QuadraticUtils.js, line 12

##### Parameters:

Name | Type | Description
--- | --- | ---
`point` | `Object` |
`angle` |  |
`width` |  |

##### Returns:

Type:
  `Object` | `Object`

#### computeMiddlePoint(point1, point2) → {Object}

Source:
  - renderer/QuadraticUtils.js, line 29

##### Parameters:

Name | Type | Description
--- | --- | ---
`point1` | `Object` |
`point2` | `Object` |

##### Returns:

Type:
  `Object`

#### convert(recognizerContext, model)

Ask for conversion using DIGITAL_EDIT

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 207

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

#### convert(recognizerContext, model, conversionState)

Convert action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 492

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`conversionState` | `String` | Conversion State, by default DigitalEdit

#### createEmptyRecognizerContext(editor) → {RecognizerContext}

Create a new recognizer context

Source:
  - model/RecognizerContext.js, line 40

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |

##### Returns:

Type:
  `RecognizerContext`

An object that contains all recognizer context

#### createHTMLElements()

Create all the smart guide HTML elements.

Source:
  - smartguide/SmartGuide.js, line 21

#### createModel(configurationopt) → {Model}

Create a new model

Source:
  - model/InkModel.js, line 49

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`configuration` | `Configuration` | <optional> | Parameters to use to populate default recognition symbols

##### Returns:

Type:
  `Model`

New model

#### createSmartGuide(editor) → {SmartGuide}

Create a new smart guide

Source:
  - smartguide/SmartGuide.js, line 290

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` | A reference to the editor.

##### Returns:

Type:
  `SmartGuide`

New smart guide

#### createStrokeComponent(properties) → {Stroke}

Create a new stroke

Source:
  - model/StrokeComponent.js, line 68

##### Parameters:

Name | Type | Description
--- | --- | ---
`properties` | `Object` | Properties to be applied to the stroke.

##### Returns:

Type:
  `Stroke`

New stroke with properties for quadratics draw

#### createUndoRedoContext(configuration) → {UndoRedoContext}

Create a new undo/redo context

Source:
  - model/UndoRedoContext.js, line 16

##### Parameters:

Name | Type | Description
--- | --- | ---
`configuration` | `Configuration` | Current configuration

##### Returns:

Type:
  `UndoRedoContext`

New undo/redo context

#### delay(time) → {Object}

Source:
  - util/PromiseHelper.js, line 27

##### Parameters:

Name | Type | Description
--- | --- | ---
`time` |  |

##### Returns:

Type:
  `Object`

#### destructurePromise() → {Object}

destructurePromise

Source:
  - util/PromiseHelper.js, line 12

##### Returns:

Type:
  `Object`

#### detach(element, context)

Detach the renderer from the DOM element

Source:
  - renderer/canvas/CanvasRenderer.js, line 121

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | `Element` | DOM element to attach the rendering elements
`context` | `Object` | Current rendering context

#### detach(element, context)

Detach the renderer from the DOM element

Source:
  - renderer/svg/SVGRenderer.js, line 33

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | `Element` | DOM element to attach the rendering elements
`context` | `Object` | Current rendering context

#### drawCurrentStroke(context, model, stroker) → {Model}

Draw the current stroke from the model

Source:
  - renderer/canvas/CanvasRenderer.js, line 159

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker

##### Returns:

Type:
  `Model`

#### drawCurrentStroke(context, model, stroker) → {Model}

Draw the current stroke from the model

Source:
  - renderer/svg/SVGRenderer.js, line 66

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker

##### Returns:

Type:
  `Model`

#### drawLine(context, p1, p2)

Draw a line

Source:
  - renderer/canvas/symbols/ShapeSymbolCanvasRenderer.js, line 115

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`p1` | `Object` | Origin point
`p2` | `Object` | Destination point

#### drawMathSymbol(context, symbol, model, stroker)

Draw a math symbol

Source:
  - renderer/canvas/symbols/MathSymbolCanvasRenderer.js, line 28

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`symbol` | `Object` | Symbol to draw
`model` | `Model` | Current model
`stroker` | `Stroker` | Stroker to use to render a stroke

#### drawModel(context, model, stroker) → {Model}

Draw all symbols contained into the model

Source:
  - renderer/canvas/CanvasRenderer.js, line 174

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker

##### Returns:

Type:
  `Model`

#### drawModel(context, model, stroker) → {Model}

Draw all symbols contained into the model

Source:
  - renderer/svg/SVGRenderer.js, line 107

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker

##### Returns:

Type:
  `Model`

#### drawShapeSymbol(context, symbol)

Draw a shape symbol

Source:
  - renderer/canvas/symbols/ShapeSymbolCanvasRenderer.js, line 142

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`symbol` | `Object` | Symbol to draw

#### drawStroke(context, stroke)

Draw a stroke on a canvas, using quadratics

Source:
  - renderer/canvas/stroker/QuadraticCanvasStroker.js, line 71

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`stroke` | `Stroke` | Current stroke to be drawn

#### drawStroke(context, stroke, stroker)

Draw a stroke symbol

Source:
  - renderer/canvas/symbols/StrokeSymbolCanvasRenderer.js, line 7

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`stroke` | `Stroke` | Stroke to be drawn
`stroker` | `Stroker` | Stroker to use to render a stroke

#### drawStroke(context, stroke)

Draw a stroke on a svg tag, using quadratics

Source:
  - renderer/svg/stroker/QuadraticSVGStroker.js, line 71

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`stroke` | `Stroke` | Current stroke to be drawn

#### drawStroke(context, stroke, stroker)

Draw a stroke symbol

Source:
  - renderer/svg/symbols/StrokeSymbolSVGRenderer.js, line 7

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`stroke` | `Stroke` | Stroke to be drawn
`stroker` | `Stroker` | Stroker to use to render a stroke

#### drawTextSymbol(context, symbol)

Draw a text symbol

Source:
  - renderer/canvas/symbols/TextSymbolCanvasRenderer.js, line 53

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`symbol` | `Object` | Symbol to draw

#### emitEvents(editor, data, …types) → {Model}

Emit events

Source:
  - recognizer/RecognizerService.js, line 15

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`data` | `Object` |  |
`types` | `String` | <repeatable> |

##### Returns:

Type:
  `Model`

#### endPendingStroke(model, point, penStyle) → {Model}

Mutate the model by adding the new point on a initPendingStroke.

Source:
  - model/InkModel.js, line 195

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model
`point` | `Object` | Captured point to be append to the current stroke
`penStyle` | `PenStyle` |

##### Returns:

Type:
  `Model`

Updated model

#### export_(recognizerContext, model, requestedMimeTypes)

Export content

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 186

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model
`requestedMimeTypes` | `Array` |

#### export_(recognizerContext, model, requestedMimeTypes)

Export action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 503

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`requestedMimeTypes` | `Array` |

#### extractPendingRecognizedSymbols(model, positionopt) → {Array.<Object>}

Get the symbols that needs to be rendered

Source:
  - model/InkModel.js, line 320

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`model` | `Model` |  |  | Current model
`position` | `Number` | <optional> | lastRendered | Index from where to extract symbols

##### Returns:

Type:
  `Array.<Object>`

#### extractPendingStrokes(model, positionopt) → {Array.<Stroke>}

Get the strokes that needs to be recognized

Source:
  - model/InkModel.js, line 148

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`model` | `Model` |  |  | Current model
`position` | `Number` | <optional> | lastReceived | Index from where to extract strokes

##### Returns:

Type:
  `Array.<Stroke>`

Pending strokes

#### extractStrokesFromInkRange(model, firstStroke, lastStroke, firstPoint, lastPoint) → {Array.<Stroke>}

Extract strokes from an ink range

Source:
  - model/InkModel.js, line 241

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model
`firstStroke` | `Number` | First stroke index to extract
`lastStroke` | `Number` | Last stroke index to extract
`firstPoint` | `Number` | First point index to extract
`lastPoint` | `Number` | Last point index to extract

##### Returns:

Type:
  `Array.<Stroke>`

The extracted strokes

#### getAvailableLanguageList(configurationopt) → {JSON}

Return the list of available recognition languages

Source:
  - EditorFacade.js, line 23

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`configuration` | `Configuration` | <optional> | Configuration to get the languages

##### Returns:

Type:
  `JSON`

A list of available languages

#### getBorderCoordinates(model) → {Bounds}

Get the bounds of the current model.

Source:
  - model/InkModel.js, line 214

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model

##### Returns:

Type:
  `Bounds`

Bounding box enclosing the current drawn model

#### getImage(model, stroker, marginopt) → {String}

Generate a PNG image data url from the model

Source:
  - renderer/canvas/ImageRenderer.js, line 22

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`model` | `Model` |  |  | Current model
`stroker` | `Stroker` |  |  | Current stroker
`margin` | `Number` | <optional> | 10 | Margins to apply around the image

##### Returns:

Type:
  `String`

Image data string result

#### getInfo() → {RecognizerInfo}

Get the configuration supported by this recognizer

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 33

##### Returns:

Type:
  `RecognizerInfo`

#### getInfo() → {RecognizerInfo}

Get the configuration supported by this recognizer

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 53

##### Returns:

Type:
  `RecognizerInfo`

#### getInfo() → {RendererInfo}

Get info

Source:
  - renderer/canvas/CanvasRenderer.js, line 29

##### Returns:

Type:
  `RendererInfo`

Information about this renderer

#### getInfo() → {StrokerInfo}

Get info

Source:
  - renderer/canvas/stroker/QuadraticCanvasStroker.js, line 23

##### Returns:

Type:
  `StrokerInfo`

Information about this stroker

#### getInfo() → {RendererInfo}

Get info

Source:
  - renderer/svg/SVGRenderer.js, line 10

##### Returns:

Type:
  `RendererInfo`

Information about this renderer

#### getInfo() → {StrokerInfo}

Get info

Source:
  - renderer/svg/stroker/QuadraticSVGStroker.js, line 8

##### Returns:

Type:
  `StrokerInfo`

Information about this stroker

#### getModel(undoRedoContext, cloneopt, …types)

Get current model in stack

Source:
  - model/UndoRedoManager.js, line 21

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`undoRedoContext` | `UndoRedoContext` |  |  | Current undo/redo context
`clone` | `Boolean` | <optional> | true | Whether or not to clone the model
`types` | `String` | <repeatable> |  |

#### getPointByIndex(stroke, index) → {Object}

Extract point by index

Source:
  - model/StrokeComponent.js, line 135

##### Parameters:

Name | Type | Description
--- | --- | ---
`stroke` | `Stroke` | Current stroke
`index` | `Number` | Zero-based index

##### Returns:

Type:
  `Object`

Point with properties for quadratics draw

#### getSupportedImportMimeTypes(recognizerContext, model)

Ask for the supported mimetypes

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 545

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### getSymbolsBounds(symbols, boundsopt) → {Bounds}

Get the box enclosing the given symbols

Source:
  - model/Symbol.js, line 88

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`symbols` | `Array` |  | Symbols to extract bounds from
`bounds` | `Bounds` | <optional> | Starting bounds for recursion

##### Returns:

Type:
  `Bounds`

Bounding box enclosing symbols

#### handleError(editor, err, …events)

Method called when server respond with an error Use in catch on Promises

Source:
  - recognizer/RecognizerService.js, line 117

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`err` | `Object` |  |
`events` | `String` | <repeatable> |

#### handleSuccess(editor, model, …events)

Method called when server respond correctly to request or WS Use in then on Promises

Source:
  - recognizer/RecognizerService.js, line 156

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`model` | `Object` |  |
`events` | `String` | <repeatable> |

#### import_(recognizerContext, model, data)

Import action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 515

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`data` | `Blob` | Import data

#### init(recognizerContext, model) → {Promise}

Initialize recognition

Source:
  - recognizer/DefaultRecognizer.js, line 65

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

##### Returns:

Type:
  `Promise`

#### init(suffixUrl, recognizerContext, buildWebSocketCallback, reconnect) → {Promise}

Init the websocket recognizer. Open the connexion and proceed to the hmac challenge.

Source:
  - recognizer/websocket/WsRecognizerUtil.js, line 35

##### Parameters:

Name | Type | Description
--- | --- | ---
`suffixUrl` | `String` |
`recognizerContext` | `RecognizerContext` |
`buildWebSocketCallback` | `BuildWebSocketFunction` |
`reconnect` | `function` |

##### Returns:

Type:
  `Promise`

Fulfilled when the init phase is over.

#### init(recognizerContext, model)

Initialize recognition The init process is in multiple part : - partChange - contentChange - initPromise: resolved only if partChange & contentChange resolved except for MATH recognition

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 283

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

#### initPendingStroke(model, point, properties, dpiopt) → {Model}

Mutate the model by adding a point and close the current stroke.

Source:
  - model/InkModel.js, line 160

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`model` | `Model` |  |  | Current model
`point` | `Object` |  |  | Captured point to create current stroke
`properties` | `Object` |  |  | Properties to be applied to the current stroke
`dpi` | `Number` | <optional> | 96 | The screen dpi resolution

##### Returns:

Type:
  `Model`

Updated model

#### inkImporter(editorParam, strokes, delayBetweenStrokes, lastOneDelay)

Function to copy past to inject ink during tutorial.

Source:
  - eastereggs/InkImporter.js, line 12

##### Parameters:

Name | Type | Description
--- | --- | ---
`editorParam` |  |
`strokes` |  |
`delayBetweenStrokes` |  |
`lastOneDelay` |  |

#### insertSmartGuide(smartGuide)

Insert the smart guide HTML elements in the DOM.

Source:
  - smartguide/SmartGuide.js, line 346

##### Parameters:

Name | Type | Description
--- | --- | ---
`smartGuide` | `SmartGuide` | A reference to the smart guide.

#### isInShadow(node) → {boolean}

Check if node is in shadow dom

Source:
  - smartguide/SmartGuide.js, line 128

##### Parameters:

Name | Type | Description
--- | --- | ---
`node` | `Node` | A node element.

##### Returns:

Type:
  `boolean`

true if is in shadow dom, false otherwise.

#### isResetRequired(recognizerContext, model) → {Boolean}

Return true if a reset is required, false otherwise

Source:
  - model/RecognizerContext.js, line 79

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` |
`model` | `Model` |

##### Returns:

Type:
  `Boolean`

#### isTriggerValid(editor, type, triggeropt) → {Boolean}

Check if the trigger in parameter is valid.

Source:
  - Editor.js, line 45

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`type` | `String` |  |
`trigger` | `String` | <optional> |

##### Returns:

Type:
  `Boolean`

#### (async) launchClose(editor, model) → {Promise.<*>}

Launch websocket close

Source:
  - Editor.js, line 233

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### (async) launchConfig(editor, model) → {Promise.<*>}

Launch the configuration for the editor

Source:
  - Editor.js, line 180

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### (async) launchConvert(editor, model, conversionState) → {Promise.<*>}

Launch the convert with all editor relative configuration and state.

Source:
  - Editor.js, line 164

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |
`conversionState` | `String` |

##### Returns:

Type:
  `Promise.<*>`

#### launchExport(editor, model, requestedMimeTypesopt, triggeropt)

Launch the recognition with all editor relative configuration and state.

Source:
  - Editor.js, line 102

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`model` | `Model` |  |
`requestedMimeTypes` | `String` | <optional> |
`trigger` | `String` | <optional> |

#### (async) launchGetSupportedImportMimeTypes(editor, model) → {Promise.<*>}

Get the supported mimetypes for import.

Source:
  - Editor.js, line 147

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### (async) launchImport(editor, model, data) → {Promise.<*>}

Launch the import.

Source:
  - Editor.js, line 131

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |
`data` | `Blob` |

##### Returns:

Type:
  `Promise.<*>`

#### (async) launchPointerEvents(editor, model, events) → {Promise.<*>}

Launch ink import.

Source:
  - Editor.js, line 85

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |
`events` | `PointerEvents` |

##### Returns:

Type:
  `Promise.<*>`

#### (async) launchResize(editor, model)

Launch the resize.

Source:
  - Editor.js, line 195

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

#### launchSmartGuide(smartGuide, exports)

Launch the smartguide.

Source:
  - smartguide/SmartGuide.js, line 418

##### Parameters:

Name | Type | Description
--- | --- | ---
`smartGuide` | `SmartGuide` | A reference to the smart guide.
`exports` | `Object` | The export from the editor.

#### (async) launchWaitForIdle(editor, model) → {Promise.<*>}

Launch wait for idle

Source:
  - Editor.js, line 217

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### manageRecognizedModel(editor, model, …types)

Manage recognized model

Source:
  - recognizer/RecognizerService.js, line 76

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`editor` | `Editor` |  |
`model` | `Model` |  |
`types` | `String` | <repeatable> |

#### manageResetState(editor, model) → {Promise.<*>}

Check if a clear is required, and does it if it is

Source:
  - Editor.js, line 30

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` | Current model

##### Returns:

Type:
  `Promise.<*>`

#### mergeModels(…models) → {Model}

Merge models

Source:
  - model/InkModel.js, line 348

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`models` | `Model` | <repeatable> | Models to merge (ordered)

##### Returns:

Type:
  `Model`

Updated model

#### needRedraw(model) → {Boolean}

Check if the model needs to be redrawn.

Source:
  - model/InkModel.js, line 97

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` | Current model

##### Returns:

Type:
  `Boolean`

True if the model needs to be redrawn, false otherwise

#### newContentPart(recognizerContext, model)

Create a new content part

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 387

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### openContentPart(recognizerContext, model)

Open the recognizer context content part

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 396

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### openWebSocket(recognizerContext) → {WebSocket}

Source:
  - recognizer/websocket/networkWSInterface.js, line 41

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Recognizer context

##### Returns:

Type:
  `WebSocket`

Opened WebSocket

#### overrideDefaultBehaviors(behaviors) → {Behaviors}

Generate behaviors

Source:
  - configuration/DefaultBehaviors.js, line 66

##### Parameters:

Name | Type | Description
--- | --- | ---
`behaviors` | `Behaviors` | Behaviors to be used

##### Returns:

Type:
  `Behaviors`

Overridden behaviors

#### overrideDefaultConfiguration(configuration, watcher:) → {Configuration}

Generate parameters

Source:
  - configuration/DefaultConfiguration.js, line 130

##### Parameters:

Name | Type | Description
--- | --- | ---
`configuration` | `Configuration` | Configuration to be used
`watcher:` | `Object` | { update: function, prop: string} function to call when 'prop' is updated

##### Returns:

Type:
  `Configuration`

Overridden configuration

#### overrideDefaultPenStyle(style) → {PenStyle}

Generate style

Source:
  - configuration/DefaultPenStyle.js, line 25

##### Parameters:

Name | Type | Description
--- | --- | ---
`style` | `PenStyle` | Custom style to be applied

##### Returns:

Type:
  `PenStyle`

Overridden style

#### overrideDefaultTheme(theme) → {Theme}

Generate theme

Source:
  - configuration/DefaultTheme.js, line 60

##### Parameters:

Name | Type | Description
--- | --- | ---
`theme` | `Theme` | Custom theme to be applied

##### Returns:

Type:
  `Theme`

Overridden theme

#### pointerEvents(recognizerContext, model, events)

Pointer Events

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 416

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`events` | `PointerEvents` | to be imported

#### post(recognizerContext, url, data, apiVersion, mimeType) → {Promise}

Post request

Source:
  - recognizer/rest/networkInterface.js, line 13

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Recognizer context
`url` | `String` | URL
`data` | `Object` | Data to be sent
`apiVersion` | `String` | api version
`mimeType` | `String` | MimeType to be used

##### Returns:

Type:
  `Promise`

#### postMessage(suffixUrl, recognizerContext, model, buildMessage, conversionState, mimeType) → {Promise.<Model>}

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 46

##### Parameters:

Name | Type | Description
--- | --- | ---
`suffixUrl` | `String` |
`recognizerContext` | `RecognizerContext` |
`model` | `Model` |
`buildMessage` | `function` |
`conversionState` | `String` |
`mimeType` | `String` |

##### Returns:

Type:
  `Promise.<Model>`

Promise that return an updated model as a result

#### redo(undoRedoContext, model)

Redo

Source:
  - model/UndoRedoManager.js, line 83

##### Parameters:

Name | Type | Description
--- | --- | ---
`undoRedoContext` | `UndoRedoContext` | Current undo/redo context.
`model` | `Model` | Current model.

#### redo(recognizerContext, model)

Redo last action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 444

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### register(element, configurationopt, penStyleopt, themeopt, behaviorsopt) → {Editor}

Attach an Editor to a DOMElement

Source:
  - EditorFacade.js, line 13

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`element` | `Element` |  | DOM element to attach an editor
`configuration` | `Configuration` | <optional> | Configuration to apply
`penStyle` | `PenStyle` | <optional> | Pen style to apply
`theme` | `Theme` | <optional> | Theme to apply
`behaviors` | `Behaviors` | <optional> | Custom behaviors to apply

##### Returns:

Type:
  `Editor`

New editor

#### reset(recognizerContext, model) → {Promise}

Reset server context. Currently nothing to do there.

Source:
  - recognizer/DefaultRecognizer.js, line 85

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`model` | `Model` | Current model

##### Returns:

Type:
  `Promise`

#### resetModelPositions(model) → {Model}

Reset model lastReceivedPosition and lastSentPosition

Source:
  - model/InkModel.js, line 284

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` |

##### Returns:

Type:
  `Model`

#### resetModelRendererPosition(model) → {Model}

Reset model lastRenderedPosition

Source:
  - model/InkModel.js, line 296

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` |

##### Returns:

Type:
  `Model`

#### resize(recognizerContext, model)

Resize

Source:
  - recognizer/rest/iinkRestRecognizer.js, line 219

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### resize(recognizerContext, model, element)

Resize

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 564

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`element` | `Element` | Current element

#### resize(context, model, stroker) → {Model}

Update the rendering context size

Source:
  - renderer/canvas/CanvasRenderer.js, line 134

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker

##### Returns:

Type:
  `Model`

#### resize(context, model, stroker, minHeight, minWidth) → {Model}

Update the rendering context size

Source:
  - renderer/svg/SVGRenderer.js, line 47

##### Parameters:

Name | Type | Description
--- | --- | ---
`context` | `Object` | Current rendering context
`model` | `Model` | Current model
`stroker` | `Stroker` | Current stroker
`minHeight` | `Number` | Minimal height for resize
`minWidth` | `Number` | Minimal Width for resize

##### Returns:

Type:
  `Model`

#### send(recognizerContext, message)

Send data message

Source:
  - recognizer/websocket/networkWSInterface.js, line 90

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`message` | `Object` | Data message

#### sendConfiguration(recognizerContext, model)

Send the recognizer configuration

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 406

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### sendMessage(recognizerContext, buildMessage, …params) → {Promise}

Source:
  - recognizer/websocket/WsRecognizerUtil.js, line 73

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`recognizerContext` | `RecognizerContext` |  |
`buildMessage` | `function` |  |
`params` | `Object` | <repeatable> |

##### Returns:

Type:
  `Promise`

#### (async) setPenStyle(editor, model) → {Promise.<*>}

Set pen style.

Source:
  - Editor.js, line 249

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### setPenStyle(recognizerContext, model, penStyle)

SetPenStyle action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 585

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`penStyle` | `PenStyle` | Current penStyle

#### (async) setPenStyleClasses(editor, model) → {Promise.<*>}

Set pen style.

Source:
  - Editor.js, line 266

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### setPenStyleClasses(recognizerContext, model, penStyleClasses)

setPenStyleClasses action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 595

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`penStyleClasses` | `String` | Current penStyleClasses

#### setRecognitionContext(recognizerContext, recognitionContext) → {RecognizerContext}

Set the recognition context

Source:
  - model/RecognizerContext.js, line 110

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`recognitionContext` | `RecognitionContext` |

##### Returns:

Type:
  `RecognizerContext`

#### (async) setTheme(editor, model) → {Promise.<*>}

Set theme.

Source:
  - Editor.js, line 283

##### Parameters:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` |
`model` | `Model` |

##### Returns:

Type:
  `Promise.<*>`

#### setTheme(recognizerContext, model, theme)

SetTheme action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 605

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model
`theme` | `Theme` | Current theme

#### shouldAttemptImmediateReconnect(recognizerContext) → {Boolean}

Test if it should attempt immediate reconnect

Source:
  - model/RecognizerContext.js, line 130

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` |

##### Returns:

Type:
  `Boolean`

True if should attempt reconnect, false otherwise

#### showActions(evt, elements, smartGuide)

Show the actions of the action menu.

Source:
  - smartguide/SmartGuide.js, line 145

##### Parameters:

Name | Type | Description
--- | --- | ---
`evt` | `Event` | Event used to insert the option div using the event's target.
`elements` | `Object` | All the elements of the smart guide.
`smartGuide` | `SmartGuide` |

#### showCandidates(evt, editor, smartGuide)

Show the candidates of the clicked word.

Source:
  - smartguide/SmartGuide.js, line 180

##### Parameters:

Name | Type | Description
--- | --- | ---
`evt` | `Event` | Event used to determine the clicked word.
`editor` | `Editor` | A reference to the editor.
`smartGuide` | `SmartGuide` | A reference to the smart guide.

#### slice(stroke, startopt, endopt) → {Stroke}

Slice a stroke and return the sliced part of it

Source:
  - model/StrokeComponent.js, line 117

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`stroke` | `Stroke` |  |  | Current stroke
`start` | `Number` | <optional> | 0 | Zero-based index at which to begin extraction
`end` | `Number` | <optional> | length | Zero-based index at which to end extraction

##### Returns:

Type:
  `Stroke`

Sliced stroke

#### toJSON(stroke) → {Object}

Get a JSON copy of a stroke by filtering its properties

Source:
  - model/StrokeComponent.js, line 86

##### Parameters:

Name | Type | Description
--- | --- | ---
`stroke` | `Stroke` | Current stroke

##### Returns:

Type:
  `Object`

Simplified stroke object

#### undo(undoRedoContext, model)

Undo

Source:
  - model/UndoRedoManager.js, line 68

##### Parameters:

Name | Type | Description
--- | --- | ---
`undoRedoContext` | `UndoRedoContext` | Current undo/redo context.
`model` | `Model` | Current model.

#### undo(recognizerContext, model)

Undo last action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 435

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### updateModel(undoRedoContext, model)

Mutate the undoRedo stack by adding a new model to it.

Source:
  - model/UndoRedoManager.js, line 35

##### Parameters:

Name | Type | Description
--- | --- | ---
`undoRedoContext` | `UndoRedoContext` | Current undo/redo context.
`model` | `Model` | Current model.

#### updateModelReceivedPosition(model) → {Model}

Update model lastReceivedPosition regarding to lastSentPosition

Source:
  - model/InkModel.js, line 273

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | `Model` |

##### Returns:

Type:
  `Model`

#### updateModelRenderedPosition(model, positionopt) → {Model}

Update model lastRenderedPosition

Source:
  - model/InkModel.js, line 308

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`model` | `Model` |  |
`position` | `Number` | <optional> |

##### Returns:

Type:
  `Model`

#### updateModelSentPosition(model, positionopt) → {Model}

Update model lastSentPosition

Source:
  - model/InkModel.js, line 262

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`model` | `Model` |  |
`position` | `Number` | <optional> |

##### Returns:

Type:
  `Model`

#### updateRecognitionPositions(recognizerContext, positions) → {RecognizerContext}

Update the recognition context positions

Source:
  - model/RecognizerContext.js, line 92

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognizer context
`positions` | `RecognitionPositions` | Current recognition positions

##### Returns:

Type:
  `RecognizerContext`

#### updateUndoRedoState(undoRedoContext) → {UndoRedoContext}

Update the undo/redo state

Source:
  - model/UndoRedoContext.js, line 31

##### Parameters:

Name | Type | Description
--- | --- | ---
`undoRedoContext` | `UndoRedoContext` | Current undo/redo context

##### Returns:

Type:
  `UndoRedoContext`

Updated undo/redo context

#### waitForIdle(recognizerContext, model)

WaitForIdle action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 554

##### Parameters:

Name | Type | Description
--- | --- | ---
`recognizerContext` | `RecognizerContext` | Current recognition context
`model` | `Model` | Current model

#### zoom(recognizerContext, model, value)

Zoom action

Source:
  - recognizer/websocket/iinkWsRecognizer.js, line 575

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`recognizerContext` | `RecognizerContext` |  | Current recognition context
`model` | `Model` |  | Current model
`value` | `Number` | 10 | Zoom value

### Type Definitions

#### Behavior

Current behavior

##### Properties:

Name | Type | Description
--- | --- | ---
`grabber` | `Grabber` | Grabber to capture strokes
`stroker` | `Stroker` | Stroker to draw stroke
`renderer` | `Renderer` | Renderer to draw on the editor
`recognizer` | `Recognizer` | Recognizer to call the recognition service
`events` | `Array` | Functions to handle model changes

Source:
  - configuration/DefaultBehaviors.js, line 11

##### Type:

- `Object`

#### Behaviors

Set of behaviors to be used by the Editor

##### Properties:

Name | Type | Description
--- | --- | ---
`grabber` | `Grabber` | Grabber to capture strokes
`strokerList` | `Array.<Stroker>` | List of stroker to draw stroke
`rendererList` | `Array.<Renderer>` | List of renderer to draw on the editor
`recognizerList` | `Array.<Recognizer>` | Recognizers to call the recognition service
`getBehaviorFromConfiguration` | `function` | Get the current behavior to use regarding the current configuration
`events` | `Array` | Functions to handle model changes

Source:
  - configuration/DefaultBehaviors.js, line 21

##### Type:

- `Object`

#### Bounds

Bounding box

##### Properties:

Name | Type | Description
--- | --- | ---
`minX` | `Number` | Minimal x coordinate
`maxX` | `Number` | Maximal x coordinate
`minY` | `Number` | Minimal y coordinate
`maxY` | `Number` | Maximal y coordinate

Source:
  - model/InkModel.js, line 35

##### Type:

- `Object`

#### BuildWebSocketFunction(destructuredPromise, recognizerContext) → {Callback}

Build websocket function

Source:
  - recognizer/websocket/WsRecognizerUtil.js, line 18

##### Parameters:

Name | Type | Description
--- | --- | ---
`destructuredPromise` | `DestructuredPromise` |
`recognizerContext` | `RecognizerContext` |

##### Returns:

Type:
  `Callback`

#### Callback(erropt, resopt)

Simple callback

Source:
  - recognizer/DefaultRecognizer.js, line 31

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`err` | `Object` | <optional> | Error
`res` | `Object` | <optional> | Result

#### Constants

Source:
  - configuration/Constants.js, line 1

##### Type:

- `Object`

#### DestructuredPromise

##### Properties:

Name | Type | Description
--- | --- | ---
`promise` | `Promise` |
`resolve` | `function` |
`reject` | `function` |

Source:
  - util/PromiseHelper.js, line 1

##### Type:

- `Object`

#### GeneratedTheme

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`font-family` | `String` | STIXGeneral | Font-family to be used
`color` | `String` | #A8A8A8FF | Color to be used

Source:
  - configuration/DefaultTheme.js, line 12

##### Type:

- `Object`

#### Grabber

Grab pointerDown, pointerMove and pointerUp events

##### Properties:

Name | Type | Description
--- | --- | ---
`attach` | `function` | Attach events and decide when to call editor pointerDown/Move/Up methods
`detach` | `function` | Detach the grabber

Source:
  - grabber/PointerEventGrabber.js, line 3

##### Type:

- `Object`

#### GrabberContext

Grabber context

##### Properties:

Name | Type | Description
--- | --- | ---
`options` | `Boolean` | `Object` | Options object that specifies characteristics about the event listener. (@see addEventListener.options for detail)
`listeners` | `Array.<GrabberListener>` | Registered listeners

Source:
  - grabber/PointerEventGrabber.js, line 17

##### Type:

- `Object`

#### GrabberListener

Grabber listener

##### Properties:

Name | Type | Description
--- | --- | ---
`types` | `Array.<String>` | Event types to listen
`listener` | `function` | Event listener for these events

Source:
  - grabber/PointerEventGrabber.js, line 10

##### Type:

- `Object`

#### InkTheme

Source:
  - configuration/DefaultTheme.js, line 5

##### Type:

- `PenStyle`

#### MathTheme

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`font-family` | `String` | STIXGeneral | Font-family to be used

Source:
  - configuration/DefaultTheme.js, line 8

##### Type:

- `Object`

#### Model

Editor model

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`currentStroke` | `Stroke` |  | Stroke in building process.
`rawStrokes` | `Array.<Stroke>` | [ | List of captured strokes.
`strokeGroups` | `Array` | [ | Group of strokes with same pen style.
`lastPositions` | `RecognitionPositions` |  | Last recognition sent/received stroke indexes.
`defaultSymbols` | `Array.<Object>` | [ | Default symbols, relative to the current recognition type.
`recognizedSymbols` | `Array.<Object>` |  | Symbols to render (e.g. stroke, shape primitives, string, characters...).
`exports` | `Object` |  | Result of the export (e.g. mathml, latex, text...).
`rawResults` | `RawResults` |  | The recognition output as return by the recognition service.
`creationTime` | `Number` |  | Date of creation timestamp.
`modificationTime` | `Number` |  | Date of lastModification.

Source:
  - model/InkModel.js, line 20

##### Type:

- `Object`

#### PenStyle

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`color` | `String` | #000000 | Color (supported formats rgb() rgba() hsl() hsla() #rgb #rgba #rrggbb #rrggbbaa)
`-myscript-pen-width` | `String` | 1 | Width of strokes and primitives in mm (no other unit is supported yet)
`-myscript-pen-fill-style` | `String` | none |
`-myscript-pen-fill-color` | `String` | #FFFFFF00 | Color filled inside the area delimited by strokes and primitives

Source:
  - configuration/DefaultPenStyle.js, line 5

##### Type:

- `Object`

#### pointerEvents

pointerEvents symbol

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`type` | `String` | pointerEvents | Symbol type, 'pointerEvents' for pointerEvents
`processGestures` | `Boolean` | False | indicates if the gestures have to be processed
`events` | `Array.<Stroke>` | [ | the events to process

Source:
  - model/StrokeComponent.js, line 18

##### Type:

- `Object`

#### RawResults

Raw results

##### Properties:

Name | Type | Description
--- | --- | ---
`convert` | `Object` | The convert result
`exports` | `Object` | The exports output as return by the recognition service.

Source:
  - model/InkModel.js, line 13

##### Type:

- `Object`

#### RecognitionContext

Recognition context

##### Properties:

Name | Type | Description
--- | --- | ---
`model` | `Model` |
`callback` | `Callback` |

Source:
  - model/RecognizerContext.js, line 3

##### Type:

- `Object`

#### RecognitionPositions

Recognition positions

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`lastSentPosition` | `Number` | <optional> | -1 | Index of the last sent stroke.
`lastReceivedPosition` | `Number` | <optional> | -1 | Index of the last received stroke.
`lastRenderedPosition` | `Number` | <optional> | -1 | Last rendered recognized symbol position

Source:
  - model/InkModel.js, line 5

##### Type:

- `Object`

#### Recognizer

Recognition service entry point

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`getInfo` | `function` |  | Get information about the supported configuration (protocol, type, apiVersion, ...).
`init` | `function` |  | Initialize recognition.
`clear` | `function` |  | Clear server context. Currently nothing to do there.
`close` | `function` |  | Close and free all resources that will no longer be used by the recognizer.
`undo` | `function` | <optional> | Undo Undo the last done action.
`redo` | `function` | <optional> | Redo Redo the previously undone action.
`resize` | `function` | <optional> | Resize.
`pointerEvents` | `function` | <optional> | Pointer Events.
`addStrokes` | `function` | <optional> | Add strokes.
`export_` | `function` | <optional> | Export content.
`import_` | `function` | <optional> | Import content.
`convert` | `function` | <optional> | Convert.
`waitForIdle` | `function` | <optional> | Wait for idle.
`setPenStyle` | `function` | <optional> | Set pen style.
`setPenStyleClasses` | `function` | <optional> | Set pen style classes.
`setTheme` | `function` | <optional> | Set theme.

Source:
  - recognizer/DefaultRecognizer.js, line 38

##### Type:

- `Object`

#### RecognizerCallback(erropt, modelopt, …typesopt)

Recognizer callback

Source:
  - recognizer/DefaultRecognizer.js, line 23

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`err` | `Object` | <optional> | Error
`model` | `Model` | <optional> | Result
`types` | `String` | <optional> <repeatable> | Result types

#### RecognizerContext

Recognizer context

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`editor` | `Editor` |  | Get a reference to the current editor
`recognitionContexts` | `Array.<RecognitionContext>` | [ |
`initPromise` | `Promise` |  |
`lastPositions` | `RecognitionPositions` |  | Last recognition sent/received stroke indexes.
`url` | `String` |  |
`websocket` | `WebSocket` |  |
`websocketCallback` | `function` |  |
`reconnect` | `function` |  |
`currentReconnectionCount` | `Number` | 0 |
`sessionId` | `String` |  |
`contentPartCount` | `Number` | 0 |
`currentPartId` | `String` |  |
`instanceId` | `String` |  |
`canUndo` | `Boolean` | false |
`canRedo` | `Boolean` | false |
`isEmpty` | `Boolean` | false |
`supportedImportMimeTypes` | `Array` | [ |
`undoStackIndex` | `Number` | 0 |
`possibleUndoCount` | `Number` | 0 |
`idle` | `Boolean` | true |
`initialized` | `Boolean` | false |

Source:
  - model/RecognizerContext.js, line 10

##### Type:

- `Object`

#### RecognizerInfo

Recognizer info

##### Properties:

Name | Type | Description
--- | --- | ---
`types` | `Array.<String>` | Supported recognition types (TEXT, MATH, SHAPE, MUSIC, ANALYZER).
`protocol` | `String` | Supported protocol (REST, WEBSOCKET).
`apiVersion` | `String` | Supported API version.
`availableTriggers` | `Triggers` | Supported triggers for this recognizer.

Source:
  - recognizer/DefaultRecognizer.js, line 14

##### Type:

- `Object`

#### Renderer

Default renderer

##### Properties:

Name | Type | Description
--- | --- | ---
`getInfo` | `function` | Get some information about this renderer
`attach` | `function` | Populate the DOM element to create rendering area.
`detach` | `function` | Remove rendering area from the DOM element.
`resize` | `function` | Explicitly resize the rendering area.
`drawCurrentStroke` | `function` | Draw the model currentStroke.
`drawModel` | `function` | Draw the model defaultSymbols and recognizedSymbols.

Source:
  - renderer/canvas/CanvasRenderer.js, line 14

##### Type:

- `Object`

#### RendererInfo

Renderer info

##### Properties:

Name | Type | Description
--- | --- | ---
`type` | `String` | Renderer type.
`apiVersion` | `String` | Supported api version.

Source:
  - renderer/canvas/CanvasRenderer.js, line 7

##### Type:

- `Object`

#### SmartGuide

Smart guide

##### Properties:

Name | Type | Description
--- | --- | ---
`editor` | `Editor` | A reference to the current editor.
`wordToChange` | `String` | Word to change following a click on a word.
`lastWord` | `String` | Keep the last word of the previous export to compare with the new and scroll if it's different.
`previousLabelExport` | `String` | Keep the previous label export to know if we should repopulate the prompter text.
`perfectScrollbar` | `PerfectScrollbar` | Perfect Scrollbar used to get gestures from smart guide using touch-action none anyway and get scrolling too.
`elements` | `Object` | All the HTML elements of the smart guide.
`smartGuideTimeOutId` | `Number` | Id of the setTimeOut from fade out animation to clear.
`randomString` | `String` | Random string used in case of multiple smart guide.

Source:
  - smartguide/SmartGuide.js, line 5

##### Type:

- `Object`

#### Stroke

Stroke symbol

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`type` | `String` | stroke | Symbol type, 'stroke' for stroke
`pointerType` | `String` |  | Pointer type
`pointerId` | `Number` |  | Pointer id
`x` | `Array.<Number>` | [ | X coordinates
`y` | `Array.<Number>` | [ | Y coordinates
`t` | `Array.<Number>` | [ | Timestamps matching x,y coordinates
`p` | `Array.<Number>` | [ | Pressure
`l` | `Array.<Number>` | [ | Length from origin
`width` | `Number` | 0 | (for rendering) Pen/brush width
`color` | `String` |  | (for rendering) Pen/brush color

Source:
  - model/StrokeComponent.js, line 3

##### Type:

- `Object`

#### Stroker

Define how a stroke should be drawn

##### Properties:

Name | Type | Description
--- | --- | ---
`getInfo` | `function` | Get some information about this stroker
`drawStroke` | `function` | Render a stroke on the current context.

Source:
  - renderer/canvas/stroker/QuadraticCanvasStroker.js, line 12

##### Type:

- `Object`

#### StrokerInfo

Stroker info

##### Properties:

Name | Type | Description
--- | --- | ---
`type` | `String` | Renderer type.
`name` | `String` | Stroker name.
`apiVersion` | `String` | Supported api version.

Source:
  - renderer/canvas/stroker/QuadraticCanvasStroker.js, line 4

##### Type:

- `Object`

#### TextTheme

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`font-family` | `String` | OpenSans | Font-family to be used
`font-size` | `Number` | 10 | Font-size to be used

Source:
  - configuration/DefaultTheme.js, line 17

##### Type:

- `Object`

#### Theme

##### Properties:

Name | Type | Description
--- | --- | ---
`ink` | `InkTheme` | General settings
`.math` | `MathTheme` | Math theme
`.math-solver` | `GeneratedTheme` | Theme to be used for generated items
`.text` | `TextTheme` | Text theme

Source:
  - configuration/DefaultTheme.js, line 22

##### Type:

- `Object`

#### Triggers

Triggers

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`exportContent` | `Array.<String>` |  | Supported triggers for exporting content.
`addStrokes` | `Array.<String>` | <optional> | Supported triggers for adding strokes.

Source:
  - recognizer/DefaultRecognizer.js, line 7

##### Type:

- `Object`

#### UndoRedoContext

Undo/redo context

##### Properties:

Name | Type | Default | Description
--- | --- | --- | ---
`stack` | `Array.<Model>` | [ | List of processed models.
`currentPosition` | `Number` | -1 | Current model index into the stack.
`maxSize` | `Number` |  | Max size of the stack.
`canUndo` | `Boolean` | false |
`canRedo` | `Boolean` | false |

Source:
  - model/UndoRedoContext.js, line 1

##### Type:

- `Object`

#### UndoRedoManager

Undo/redo manager

##### Properties:

Name | Type | Description
--- | --- | ---
`updateModel` | `function` | Push the current model into the undo/redo context.
`undo` | `function` | Undo.
`redo` | `function` | Redo.
`clear` | `function` | Clear.

Source:
  - model/UndoRedoManager.js, line 6

##### Type:

- `Object`