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

Methods

refresh()

(Re)renders markdown. Can be helpfull if not all elements are updated correctly. Triggering refresh may change the caret position as well.

Source

replaceText(text, options)

Replaces the current text with new text

Parameters

  • text string
  • options Object

    Properties

    • clearHistory boolean
    • dontAddToHistory boolean

Source