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

ComposerBody

Extends:

src/common/Component.js~Component → ComposerBody

The ComposerBody component handles the body, or the content, of the composer. Subclasses should implement the onsubmit method and override headerTimes.

Attrs

  • composer
  • originalContent
  • submitLabel
  • placeholder
  • user
  • confirmExit
  • disabled

Member Summary

Public Members
public
public

content: *

this member was deprecated. BC layer, remove in Beta 15.
public

editor: *

public

Whether or not the component is loading.

Method Summary

Public Methods
public

Check if there is any unsaved data.

public

Build an item list for the composer's header.

public

loaded()

Stop loading.

public

oninit(vnode: *)

public abstract

Handle the submit event of the text editor.

public

view(): *

Public Members

public composer: * source

public content: * source

this member was deprecated. BC layer, remove in Beta 15.

public editor: * source

public loading: Boolean source

Whether or not the component is loading.

Public Methods

public hasChanges(): String source

Check if there is any unsaved data.

Return:

String

public headerItems(): ItemList source

Build an item list for the composer's header.

Return:

ItemList

public loaded() source

Stop loading.

public oninit(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public abstract onsubmit() source

Handle the submit event of the text editor.

public view(): * source

Return:

*