Categories

.uiEditor()

Categories: UI

ep.uiEditor(options)

Subclass: ep

Inherit: (Subclass: ep) .widget()

Plugin: ep.ui.editor

Description: Creates an inline wysiwyg editor.

  • ep.uiEditor(options)

    version added: 6.15.0

    options   A map of additional options pass to the method.

The ep.uiEditor method creates an inline wysiwyg editor.

  • Creates a wysiwyg editor depending on a textarea with id and name attributes. Textareas with the same value in the name attribute become a shared toolbar.

    HTML:
    <div style="clear:both; position:relative;">
      <textarea style="visiblity:hidden;" name="editorName" id="editorID">Some Content</textarea>
    </div>
    
    Code:
    ep('#editorID').uiEditor({
      'name': 'editorName',
      'toolbar': 'Mini',
      'disable': true,
      'hideToolbarOnStartup': false,
      'noToolbar': true,
      'useAbsolute': true,
      'blogPostMode': true,
      'pluginOptions': {}
    });
    
    
  • name

    version added: 6.15.0

    Name of the editor (corresponds to the name attribute of the textarea).

    Default: undefined

  • toolbar

    version added: 6.15.0

    Indicates which toolbar should be used. If option is not handed over a default value from the config.js is used (depending on screen width, content etc.). Possible values: 'Full', 'FullPageBreak', 'Mini', 'MiniPageBreak'

    Default: undefined

  • disable

    version added: 6.15.0

    Boolean Flag which indicates if the editor is disabled (true) on startup.

    Default: false

  • hideToolbarOnStartup

    version added: 6.15.0

    Boolean Flag which indicates if the toolbar should be hidden (true) on startup.

    Default: false

  • noToolbar

    version added: 6.15.0

    Boolean Flag which indicates if editor has a toolbar.

    Default: false

  • useAbsolute

    version added: 6.15.0

    Boolean Flag which indicates if an absolute url should be used in the linkpicker plugin.

    Default: false

  • blogPostMode

    version added: 6.15.0

    Boolean Flag which indicates if the toolbar should contain button to insert a pagebreak.

    Default: false

  • pluginOptions

    version added: 6.15.0

    Additional options for plugins

    Default: false

  • adjustToolbar

    • .uiEditor('adjustToolbar', editorName, initial)

      version added: 6.15.0

      editorName   Name of the editor handed over with the name option when editor widget gets initialized.

      initial   Boolean flag to indicate if the method is called the first time.

    Recalculates the dimensions (width and height) of toolbar and disable layer depending on the editor(s) width.

  • disableEditor

    • .uiEditor('disableEditor', disable)

      version added: 6.15.0

      disable   Boolean flag to indicate if the editor should be disabled (true) or enabled (false).

    Depending on the boolean parameter the editor gets enabled (false) or disabled (true).

  • toggleToolbar

    • .uiEditor('toggleToolbar', show)

      version added: 6.15.0

      show   Boolean flag to indicate if the toolbar should be shown (true) or hidden (false).

    Depending on the boolean parameter the toolbar is shown (true) or hidden (false).

  • reloadToolbar

    • .uiEditor('reloadToolbar', editorName)

      version added: 6.15.0

      editorName   Name of the editor handed over with the name option when editor widget gets initialized.

    Reloads the toolbar depending on the language of the current editor.