# Namespace: htmlHelpers

## core.utils. htmlHelpers

Набор вспомогательных методов для манипуляций с html.

Source:
  - utils/utilsApi.js, line 50

### Methods

#### <static> forbidSelection()

  Use CSS for the same effect. IE8 is not supported anymore.

  Deprecated:
    - Yes
  Source:
    - utils/htmlHelpers.js, line 124

#### <static> getDocumentPosition()

  Use jQuery `.offset()`.

  Deprecated:
    - Yes
  Source:
    - utils/htmlHelpers.js, line 143

#### <static> highlightMentions(text, escape) → {String}

  Highlights mentioned with `@` users in text with <a href='...'></a> tag.

  ##### Parameters:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `text` | String |  |  | Text to highlight.
  `escape` | Boolean | <optional> | true | If true, `Handlebars.Utils.escapeExpression` will be applied on to the `text` before highlighting.

  Source:
    - utils/htmlHelpers.js, line 61

  ##### Returns:

  Highlighted text

  Type
    String

#### <static> highlightText(text, fragment, escape) → {String}

  Highlights fragments within a text with <span class='highlight'></span>.

  ##### Parameters:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `text` | String |  |  | Text to highlight.
  `fragment` | String |  |  | highlighted fragment.
  `escape` | Boolean | <optional> | true | If true, `Handlebars.Utils.escapeExpression` will be applied on to the `text` before highlighting.

  Source:
    - utils/htmlHelpers.js, line 28

  ##### Returns:

  Highlighted text

  Type
    String

#### <static> highlightUrls(text, escape) → {String}

  Highlights urls within a text with <a href='...'></a> tag.

  ##### Parameters:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `text` | String |  |  | Text to highlight.
  `escape` | Boolean | <optional> | true | If true, `Handlebars.Utils.escapeExpression` will be applied on to the `text` before highlighting.

  Source:
    - utils/htmlHelpers.js, line 97

  ##### Returns:

  Highlighted text

  Type
    String

#### <static> isElementInDom(el) → {Boolean}

  Checks if element is presented in visible DOM.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `el` | Object | DOM-element to check.

  Source:
    - utils/htmlHelpers.js, line 116

  ##### Returns:

  True if an element is presented in DOM.

  Type
    Boolean