mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 08:56:36 +08:00
added observer to Discourse.PagedownEditor value to refresh previewer
This commit is contained in:
parent
45c4382cce
commit
ba80ca2ee5
|
@ -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 New Issue
Block a user