Add preview button to composer

This commit is contained in:
Toby Zerner
2015-07-28 13:34:42 +09:30
parent 8c18ff3349
commit e2a4cf5ccb
9 changed files with 47 additions and 7 deletions

View File

@ -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);