|
|
@ -880,11 +880,17 @@ MessageComposer.prototype.onEmojiSelected = function (code, autocomplete) { |
|
|
|
} |
|
|
|
} |
|
|
|
textarea.value = newValue; |
|
|
|
textarea.value = newValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var html; |
|
|
|
|
|
|
|
if (suffix.length) { |
|
|
|
this.selId = (this.selId || 0) + 1; |
|
|
|
this.selId = (this.selId || 0) + 1; |
|
|
|
var html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix); |
|
|
|
html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix); |
|
|
|
|
|
|
|
|
|
|
|
this.richTextareaEl.html(html); |
|
|
|
this.richTextareaEl.html(html); |
|
|
|
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]); |
|
|
|
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
html = this.getRichHtml(newValuePrefix) + ' '; |
|
|
|
|
|
|
|
this.richTextareaEl.html(html); |
|
|
|
|
|
|
|
setRichFocus(textarea); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
var html = this.getEmojiHtml(code); |
|
|
|
var html = this.getEmojiHtml(code); |
|
|
|
if (window.getSelection) { |
|
|
|
if (window.getSelection) { |
|
|
@ -967,11 +973,17 @@ MessageComposer.prototype.onMentionSelected = function (username) { |
|
|
|
} |
|
|
|
} |
|
|
|
textarea.value = newValue; |
|
|
|
textarea.value = newValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var html; |
|
|
|
|
|
|
|
if (suffix.length) { |
|
|
|
this.selId = (this.selId || 0) + 1; |
|
|
|
this.selId = (this.selId || 0) + 1; |
|
|
|
var html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix); |
|
|
|
html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix); |
|
|
|
|
|
|
|
|
|
|
|
this.richTextareaEl.html(html); |
|
|
|
this.richTextareaEl.html(html); |
|
|
|
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]); |
|
|
|
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
html = this.getRichHtml(newValuePrefix) + ' '; |
|
|
|
|
|
|
|
this.richTextareaEl.html(html); |
|
|
|
|
|
|
|
setRichFocus(textarea); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
var textarea = this.textareaEl[0]; |
|
|
|
var textarea = this.textareaEl[0]; |
|
|
|