From c6d969c4bd301d5a1865b9ee7ff1190b7a7778cd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 11 Dec 2017 08:31:43 +0100 Subject: Fix switching to html text. We sometimes ended up with an html string (not representation) in html model after switching for the first time. --- framework/qml/TextEditor.qml | 5 +++-- 1 file 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 { onHtmlEnabledChanged: { if (htmlEnabled) { - var t = document.htmlText + var t = document.plainText edit.textFormat = Qt.RichText edit.text = t } else { @@ -101,7 +101,8 @@ FocusScope { focus: true selectByMouse: true - wrapMode: TextEdit.WordWrap + wrapMode: TextEdit.Wrap + textFormat: Qt.PlainText onCursorRectangleChanged: flickableItem.ensureVisible(cursorRectangle) color: Kube.Colors.textColor -- cgit v1.2.3