Reference Source
import TextEditor from 'flarum/components/TextEditor'
public class | source

TextEditor

Extends:

src/common/Component.js~Component → TextEditor

The TextEditor component displays a textarea with controls, including a submit button.

Attrs

  • composer
  • submitLabel
  • value
  • placeholder
  • disabled
  • preview

Member Summary

Public Members
public

The value of the textarea.

Method Summary

Public Methods
public

Build an item list for the text editor controls.

public

oncreate(vnode: *)

public

oninit(vnode: *)

public

oninput(value: String)

Handle input into the textarea.

public

Handle the submit button being clicked.

public

Build an item list for the toolbar controls.

public

view(): *

Public Members

public value: String source

The value of the textarea.

Public Methods

public controlItems(): ItemList source

Build an item list for the text editor controls.

Return:

ItemList

public oncreate(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public oninit(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public oninput(value: String) source

Handle input into the textarea.

Params:

NameTypeAttributeDescription
value String

public onsubmit() source

Handle the submit button being clicked.

public toolbarItems(): ItemList source

Build an item list for the toolbar controls.

Return:

ItemList

public view(): * source

Return:

*