1
0
mirror of https://github.com/flarum/core.git synced 2025-10-27 05:31:29 +01:00
Files
php-flarum/js/dist-typings/forum/components/DiscussionComposer.d.ts
flarum-bot 3d62a6af27 Bundled output for commit d268894e61
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-27 19:02:33 +00:00

35 lines
1.0 KiB
TypeScript

/**
* The `DiscussionComposer` component displays the composer content for starting
* a new discussion. It adds a text field as a header control so the user can
* enter the title of their discussion. It also overrides the `submit` and
* `willExit` actions to account for the title.
*
* ### Attrs
*
* - All of the attrs for ComposerBody
* - `titlePlaceholder`
*/
export default class DiscussionComposer extends ComposerBody {
static initAttrs(attrs: any): void;
/**
* The value of the title input.
*
* @type {Function}
*/
title: Function | undefined;
/**
* Handle the title input's keydown event. When the return key is pressed,
* move the focus to the start of the text editor.
*
* @param {KeyboardEvent} e
*/
onkeydown(e: KeyboardEvent): void;
/**
* Get the data to submit to the server when the discussion is saved.
*
* @return {Record<string, unknown>}
*/
data(): Record<string, unknown>;
}
import ComposerBody from "./ComposerBody";