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