mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Disable rich text on message field and span tag when emoji is inserted
This commit is contained in:
parent
b38c944484
commit
6ea85de4ba
2 changed files with 2 additions and 3 deletions
|
@ -224,7 +224,6 @@ Item
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
inputMethodHints: Qt.ImhMultiLine
|
inputMethodHints: Qt.ImhMultiLine
|
||||||
textFormat: TextEdit.RichText
|
|
||||||
|
|
||||||
onTextChanged:
|
onTextChanged:
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,10 +27,10 @@ Rectangle {
|
||||||
if (plainText.length > 0) {
|
if (plainText.length > 0) {
|
||||||
var lastChar = plainText[plainText.length-1]
|
var lastChar = plainText[plainText.length-1]
|
||||||
if ((lastChar !== ' ') && (lastChar.charCodeAt(0) < 255)) {
|
if ((lastChar !== ' ') && (lastChar.charCodeAt(0) < 255)) {
|
||||||
strAppnd = " "
|
strAppnd = " "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strAppnd += '<span style="font-size: 22px">' + selectedEmoji + '</span>'
|
strAppnd += selectedEmoji
|
||||||
|
|
||||||
textArea.insert(textArea.cursorPosition, strAppnd)
|
textArea.insert(textArea.cursorPosition, strAppnd)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue