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

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

attrs(): {"className": *}

public

config(isInitialized: *, context: *)

public

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

public
public

Build an item list for the post's header.

public

init()

public

isEditing(): *

public

Toggle the visibility of a hidden post's content.

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 attrs(): {"className": *} source

Return:

{"className": *}

public config(isInitialized: *, context: *) source

Params:

NameTypeAttributeDescription
isInitialized *
context *

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

Params:

NameTypeAttributeDescription
element *
isInitialized *
context *

public content(): undefined[] source

Return:

undefined[]

public headerItems(): ItemList source

Build an item list for the post's header.

Return:

ItemList

public init() source

public isEditing(): * source

Return:

*

public toggleContent() source

Toggle the visibility of a hidden post's content.