Constructor
new FocusEditorCore(target, initialText)
Parameters
-
target
HTMLElement -
initialText
string
Source
Methods
allChildren() → {NodeList}
Returns
-
NodeListAll children of the target element
Source
appendCharacter(char)
Appends character(s) without rerendering the whole editor
Parameters
-
char
string
Source
getMarkdown() → {string}
Returns the plain text.
Returns
-
stringplain text
Source
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
ObjectProperties
-
clearHistory
boolean -
dontAddToHistory
boolean
-
clearHistory
Source
toggleZenMode()
Toggles Zen Mode (means setting the focus editor to full screen)