Focus Editor

Class

FocusEditorCore

Focus Editor Core class creates the editable content element and manages all its' changes on the text

Constructor

new FocusEditorCore(target, initialText)

Parameters

  • target HTMLElement
  • initialText string

Source

Members

Replaces all http(s) urls with links This is very experimental and may not work as expected, keep it for now ;)

Source

Methods

fullRefresh()

(Re)renders markdown Can be helpful if not all elements are updated correctly. Triggering refresh may change the caret position as well. If possible use refresh() instead, it's less disruptive and faster.

Source

replaceText(text, options)

Replaces the current text with new text

Parameters

  • text string
  • options Object

    Properties

    • clearHistory boolean
    • dontAddToHistory boolean

Source