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

EditPostComposer

Extends:

src/common/Component.js~ComponentComposerBody → EditPostComposer

The EditPostComposer component displays the composer content for editing a post. It sets the initial content to the content of the post that is being edited, and adds a header control to indicate which post is being edited.

Attrs

  • All of the attrs for ComposerBody
  • post

Static Method Summary

Static Public Methods
public static

initAttrs(attrs: *)

Member Summary

Public Members
public

Method Summary

Public Methods
public

Get the data to submit to the server when the post is saved.

public
public

Jump to the preview when triggered by the text editor.

public

Inherited Summary

From class ComposerBody
public
public

Whether or not the component is loading.

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(): *

Static Public Methods

public static initAttrs(attrs: *) source

Params:

NameTypeAttributeDescription
attrs *

Public Members

public loading: boolean source

Whether or not the component is loading.

Override:

ComposerBody#loading

Public Methods

public data(): Object source

Get the data to submit to the server when the post is saved.

Return:

Object

public headerItems(): * source

Build an item list for the composer's header.

Override:

ComposerBody#headerItems

Return:

*

public jumpToPreview(e: *) source

Jump to the preview when triggered by the text editor.

Params:

NameTypeAttributeDescription
e *

public onsubmit() source

Handle the submit event of the text editor.

Override:

ComposerBody#onsubmit