Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    A plugin for the chat message editor which handles interactivity.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get chat(): ChatLog

      The ChatLog instance this plugin belongs to.

      Returns ChatLog

    • get key(): PluginKey<any>

      A unique key for this plugin that can be used to identify a plugin instance in any given editor.

      Returns PluginKey<any>

    Methods

    • Handle sending a chat message.

      Parameters

      • view: EditorView

        The editor view.

      Returns Promise<void>

    • Set the contents of the chat input to the given value.

      Parameters

      • view: EditorView

        The editor view.

      • message: string

        The message to set.

      • meta: object

        Any metadata to append to the transaction.

      Returns void

    • Protected

      Inspect transactions and update pending state if they involve insertions or deletions.

      Parameters

      • transactions: Transaction[]

        The transactions.

      • oldState: EditorState

        The editor state before.

      • newState: EditorState

        The editor state after.

      Returns void

    • Protected

      Handle keydown events.

      Parameters

      • view: EditorView

        The editor view.

      • event: KeyboardEvent

        The keyboard event.

      Returns boolean | void

    • Build the plugin.

      Parameters

      • schema: Schema

        The ProseMirror schema to build the plugin against.

      • Optionaloptions: { chat?: any } = {}
        • Optionalchat?: any

          The ChatLog instance this plugin belongs to.

      Returns Plugin<any>