mirror of
https://github.com/flarum/framework.git
synced 2025-05-24 23:59:57 +08:00
Add preview button to composer
This commit is contained in:
@ -12,6 +12,14 @@ import icon from 'flarum/helpers/icon';
|
||||
* - `post`
|
||||
*/
|
||||
export default class EditPostComposer extends ComposerBody {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.editor.props.preview = () => {
|
||||
m.route(app.route.post(this.props.post));
|
||||
};
|
||||
}
|
||||
|
||||
static initProps(props) {
|
||||
super.initProps(props);
|
||||
|
||||
|
Reference in New Issue
Block a user