EditorManager

Editors. EditorManager

EditorManager

Constructor

new EditorManager()

Source:

Methods

(static) createEditor(fragment, config) → {Array.<Editors.Editor>}

Description:
  • Create an editor for the given fragment/array of fragments.
    config options:
     editor: null | EditorClass -- If not null, tries to create the specified editor
     theme: "light" | "dark" -- The theme to use for the editor
     mode: "inline" | "full" -- Inline fills the space its in, full resizes the editor to show all lines.
     readOnly: true|false -- Should the editor be read only
Source:
Example
let editor = EditorManager.create(Fragment.one("#myFragment"), {theme:"light", mode: "full"})[0];
Parameters:
Name Type Description
fragment Fragments.Fragment | Array.<Fragments.Fragment> The fragment, or array of fragments to create the editors from
config EditorManager~EditorConfig The editor config to use
Returns:
the created editors
Type
Array.<Editors.Editor>