Flarum (v2.0.0-beta.3)
    Preparing search index...
    Index

    Constructors

    Properties

    body: any = ...

    The dynamic component being shown inside the composer.

    editor: EditorDriverInterface | null = null

    A reference to the text editor that allows text manipulation.

    fields: Record<string, Stream<any>> & { content: Stream<string> }

    Fields of the composer.

    height: number | null = null

    The composer's intended height, which can be modified by the user (by dragging the composer handle).

    mounted: boolean = false

    If the composer was loaded and mounted.

    onExit: { callback: () => boolean; message: string } | null = null
    position: string = ComposerState.Position.HIDDEN

    The composer's current position.

    Position: {
        FULLSCREEN: string;
        HIDDEN: string;
        MINIMIZED: string;
        NORMAL: string;
    } = ...

    Methods

    • Determine whether the body matches the given component class and data.

      Parameters

      • type: string | object

        The component class to check against. Subclasses are accepted as well.

      • data: any = {}

      Returns boolean

    • Determine whether or not the Composer is covering the screen.

      This will be true if the Composer is in full-screen mode on desktop, or if we are on a mobile device, where we always consider the composer as full-screen..

      Returns boolean

    • Configure when / what to ask the user before closing the composer.

      The provided callback will be used to determine whether asking for confirmation is necessary. If the callback returns true at the time of closing, the provided text will be shown in a standard confirmation dialog.

      Parameters

      • callback: () => boolean
      • message: string

      Returns void