# Class: KonvaTextTool

## Constructor

#### new KonvaTextTool()

  Describes the whiteboard text tool.

## Methods

#### endInput(event, canvas, textInput, scale) → {Konva.Text}

  Removes an input text element and creates konvaText which is going to be rendered.
  Function is being invoked when the user triggers mousedown event
  on the whiteboard canvas when a text tool is selected and the user
  is typing text.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | object | HTML DOM mousedown event.
  `canvas` | Canvas | Whiteboard canvas where the text should be rendered on.
  `textInput` | string | Text that is going to be rendered.
  `scale` | number | Scale which currently applies to the whiteboard canvas.

  ##### Returns:

  { Konva.Text }

#### startInput(event, canvas, mode, scale) → {void}

  Creates an input text element where the user can type text.
  Function is being invoked when the user triggers mousedown event
  on the whiteboard canvas when a text tool is selected.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | object | HTML DOM mousedown event.
  `canvas` | Canvas | Whiteboard canvas where the text should be rendered on.
  `mode` | string | Tool mode: filled or stroke.
  `scale` | number | Scale which currently applies to the whiteboard canvas.

  ##### Returns:

  { void }