diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-11 08:31:43 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-11 08:31:43 +0100 |
commit | c6d969c4bd301d5a1865b9ee7ff1190b7a7778cd (patch) | |
tree | c5a373d5005a0a4919383d1c45686c1ad5413df5 | |
parent | 55acce3807d7446321dd9f943a1ba2bf1fc89aa7 (diff) | |
download | kube-c6d969c4bd301d5a1865b9ee7ff1190b7a7778cd.tar.gz kube-c6d969c4bd301d5a1865b9ee7ff1190b7a7778cd.zip |
Fix switching to html text.
We sometimes ended up with an html string (not representation) in html
model after switching for the first time.
-rw-r--r-- | framework/qml/TextEditor.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index b6e62ef6..b40d677c 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml | |||
@@ -39,7 +39,7 @@ FocusScope { | |||
39 | 39 | ||
40 | onHtmlEnabledChanged: { | 40 | onHtmlEnabledChanged: { |
41 | if (htmlEnabled) { | 41 | if (htmlEnabled) { |
42 | var t = document.htmlText | 42 | var t = document.plainText |
43 | edit.textFormat = Qt.RichText | 43 | edit.textFormat = Qt.RichText |
44 | edit.text = t | 44 | edit.text = t |
45 | } else { | 45 | } else { |
@@ -101,7 +101,8 @@ FocusScope { | |||
101 | 101 | ||
102 | focus: true | 102 | focus: true |
103 | selectByMouse: true | 103 | selectByMouse: true |
104 | wrapMode: TextEdit.WordWrap | 104 | wrapMode: TextEdit.Wrap |
105 | textFormat: Qt.PlainText | ||
105 | onCursorRectangleChanged: flickableItem.ensureVisible(cursorRectangle) | 106 | onCursorRectangleChanged: flickableItem.ensureVisible(cursorRectangle) |
106 | 107 | ||
107 | color: Kube.Colors.textColor | 108 | color: Kube.Colors.textColor |