Disable rich text on message field and span tag when emoji is inserted

This commit is contained in:
Angela Mazzurco 2017-07-01 17:13:44 +02:00
parent b38c944484
commit 6ea85de4ba
2 changed files with 2 additions and 3 deletions

View File

@ -224,7 +224,6 @@ Item
focus: true
inputMethodHints: Qt.ImhMultiLine
textFormat: TextEdit.RichText
onTextChanged:
{

View File

@ -27,10 +27,10 @@ Rectangle {
if (plainText.length > 0) {
var lastChar = plainText[plainText.length-1]
if ((lastChar !== ' ') && (lastChar.charCodeAt(0) < 255)) {
strAppnd = "&nbsp;"
strAppnd = " "
}
}
strAppnd += '<span style="font-size: 22px">' + selectedEmoji + '</span>'
strAppnd += selectedEmoji
textArea.insert(textArea.cursorPosition, strAppnd)
}