mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 17:53:44 +08:00
FIX: Pasted text removing if server unable to parse HTML to Markdown
This commit is contained in:
parent
2ff3444568
commit
0a47642003
|
@ -670,7 +670,11 @@ export default Ember.Component.extend({
|
|||
type: 'POST',
|
||||
data: { html }
|
||||
}).then(response => {
|
||||
if (response.markdown) {
|
||||
self.appEvents.trigger('composer:replace-text', placeholder, response.markdown);
|
||||
} else if (!plainText) {
|
||||
self.appEvents.trigger('composer:replace-text', placeholder, "");
|
||||
}
|
||||
}).catch(error => {
|
||||
if (!plainText) {
|
||||
self.appEvents.trigger('composer:replace-text', placeholder, "");
|
||||
|
|
Loading…
Reference in New Issue
Block a user