mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
Merge pull request #414 from awbergs/pagedown_observe
added observer to Discourse.PagedownEditor value to refresh previewer
This commit is contained in:
commit
dad71a78f7
1 changed files with 8 additions and 1 deletions
|
@ -34,7 +34,14 @@ Discourse.PagedownEditor = Ember.ContainerView.extend({
|
|||
$wmdInput.data('init', true);
|
||||
this.editor = Discourse.Markdown.createEditor();
|
||||
return this.editor.run();
|
||||
}
|
||||
},
|
||||
|
||||
observeValue: (function() {
|
||||
var _this = this;
|
||||
Ember.run.next(null, function() {
|
||||
_this.editor && _this.editor.refreshPreview();
|
||||
});
|
||||
}).observes('value')
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue