tiny_noautolink/noautolink

Helper for Tiny noautolink plugin.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(static, constant) handleAction

Source:

Handle action.

(static, constant) toggleActiveState

Source:

Change the active state of button.

Methods

(inner) getAnchorElement(editor, selectedElm) → {Element}

Source:

Get anchor element.

Parameters:
Name Type Description
editor TinyMCE
selectedElm Element
Returns:
Type
Element

(inner) getSelectedContent(editor) → {String}

Source:

Return the full string based on the position of the cursor within the string.

Parameters:
Name Type Description
editor TinyMCE
Returns:
Type
String

(inner) isInAnchor(editor, selectedElm) → {boolean}

Source:

Check the current selected element is an anchor or not.

Parameters:
Name Type Description
editor TinyMCE
selectedElm Element
Returns:
Type
boolean

(inner) isValidUrl(urlString) → {boolean}

Source:

Check if given string is a valid URL.

Parameters:
Name Type Description
urlString String

URL the link will point to.

Returns:

True is valid, otherwise false.

Type
boolean
Source:

Display notification feedback when applying the noautolink to the selected text.

Parameters:
Name Type Description
editor TinyMCE
messages object
urlString String

(async, inner) setNoautolinkOnSelection(editor, url)

Source:

Wrap the selection with the nolink class.

Parameters:
Name Type Description
editor TinyMCE
url String

URL the link will point to.

(inner) toggleState(editor, toggler) → {function}

Source:

Change state of button.

Parameters:
Name Type Description
editor TinyMCE
toggler function
Returns:
Type
function
Source:

Display notification feedback when removing the noautolink to the selected text.

Parameters:
Name Type Description
editor TinyMCE
messages object

(async, inner) unsetNoautolinkOnSelection(editor, url)

Source:

Remove the nolink on the selection.

Parameters:
Name Type Description
editor TinyMCE
url String

URL the link will point to.