From 69c2e873e74727526cf197ab4a06b368a1d820ec Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 31 Jul 2018 13:46:48 +0200 Subject: Fixed texteditor test --- framework/qml/TextEditor.qml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'framework/qml/TextEditor.qml') diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index 7dd30625..bc50169e 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml @@ -24,9 +24,8 @@ import org.kube.framework 1.0 as Kube FocusScope { id: root - property string text: "" - - property bool htmlEnabled: false + property string text: document.text + property bool htmlEnabled: document.containsFormatting property alias bold: document.bold property alias italic: document.italic @@ -46,10 +45,6 @@ FocusScope { document: edit.textDocument selectionStart: edit.selectionStart selectionEnd: edit.selectionEnd - onTextChanged: { - root.htmlEnabled = containsFormatting(); - root.htmlEnabled ? root.text = htmlText : root.text = plainText - } cursorPosition: edit.cursorPosition } -- cgit v1.2.3