mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
A helper for cooked content in a decorator
This commit is contained in:
parent
65553d7b70
commit
fdf0047f56
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import Connector from 'discourse/widgets/connector';
|
||||
import { h } from 'virtual-dom';
|
||||
import PostCooked from 'discourse/widgets/post-cooked';
|
||||
|
||||
class DecoratorHelper {
|
||||
constructor(widget, attrs, state) {
|
||||
|
@ -15,6 +16,10 @@ class DecoratorHelper {
|
|||
getModel() {
|
||||
return this.widget.findAncestorModel();
|
||||
}
|
||||
|
||||
cooked(cooked) {
|
||||
return new PostCooked({ cooked });
|
||||
}
|
||||
}
|
||||
DecoratorHelper.prototype.h = h;
|
||||
|
||||
|
|
Loading…
Reference in a new issue