Reference Source
import CommentPost from 'flarum/components/CommentPost.js'
public class | source

CommentPost

Extends:

flarum/components/Post~Post → CommentPost

The CommentPost component displays a standard comment-typed post. This includes a number of item lists (controls, header, and footer) surrounding the post's HTML content.

Props

  • post

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

If the post has been hidden, then this flag determines whether or not its content has been expanded.

Method Summary

Public Methods
public

Build an item list for the post's actions.

public

attrs(): {"className": *}

public

configPreview(element: *, isInitialized: *, context: *)

public
public

Build an item list for the post's footer.

public

Build an item list for the post's header.

public

isEditing(): *

public

Toggle the visibility of a hidden post's content.

Public Constructors

public constructor() source

Public Members

public postUser: * source

public revealContent: Boolean source

If the post has been hidden, then this flag determines whether or not its content has been expanded.

Public Methods

public actionItems(): ItemList source

Build an item list for the post's actions.

Return:

ItemList

public attrs(): {"className": *} source

Return:

{"className": *}

public configPreview(element: *, isInitialized: *, context: *) source

Params:

NameTypeAttributeDescription
element *
isInitialized *
context *

public content(): undefined[] source

Return:

undefined[]

public footerItems(): ItemList source

Build an item list for the post's footer.

Return:

ItemList

public headerItems(): ItemList source

Build an item list for the post's header.

Return:

ItemList

public isEditing(): * source

Return:

*

public toggleContent() source

Toggle the visibility of a hidden post's content.