plugin.replaceSelectedText

The 'replaceSelectedText' function replaces the currently selected text with the given text in the HTML editor.

  • Prototype: plugin.replaceSelectedText(iDbPos, sTxt, bRich);
  • Parameters:
    1. iDbPos: a position number (0-based) of the database on the tab control; -1 for the current database.
    2. sTxt: the new HTML source or plain text.
    3. bRich: true for HTML source, false for plain text.
  • Return Value: true on success, or false on failure.
  • Example:
    alert(plugin.replaceSelectedText(-1, 'new text', false));