Allow copying messages via right click

fixes #291
This commit is contained in:
Nicolas Werner 2021-04-29 23:38:45 +02:00
parent 9ab1dc253e
commit 2d678bdcf6
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
4 changed files with 17 additions and 4 deletions

View file

@ -7,6 +7,7 @@ import im.nheko 1.0
MatrixText {
property string formatted: model.data.formattedBody
property string copyText: selectedText ? getText(selectionStart, selectionEnd) : model.data.body
text: "<style type=\"text/css\">a { color:" + colors.link + ";}\ncode { background-color: " + colors.alternateBase + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + colors.alternateBase + "'>")
width: parent ? parent.width : undefined