mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:22 +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 => {
|
||||
self.appEvents.trigger('composer:replace-text', placeholder, response.markdown);
|
||||
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