diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-31 13:46:48 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-31 13:46:48 +0200 |
commit | 69c2e873e74727526cf197ab4a06b368a1d820ec (patch) | |
tree | 94ff7659ca6bb8e9e26ad1418d24bdd26ccc93af /framework/qml/TextEditor.qml | |
parent | ab2b00093e1a40fc8dabd2c95b4bbd576e88e953 (diff) | |
download | kube-69c2e873e74727526cf197ab4a06b368a1d820ec.tar.gz kube-69c2e873e74727526cf197ab4a06b368a1d820ec.zip |
Fixed texteditor test
Diffstat (limited to 'framework/qml/TextEditor.qml')
-rw-r--r-- | framework/qml/TextEditor.qml | 9 |
1 files changed, 2 insertions, 7 deletions
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 | |||
24 | 24 | ||
25 | FocusScope { | 25 | FocusScope { |
26 | id: root | 26 | id: root |
27 | property string text: "" | 27 | property string text: document.text |
28 | 28 | property bool htmlEnabled: document.containsFormatting | |
29 | property bool htmlEnabled: false | ||
30 | 29 | ||
31 | property alias bold: document.bold | 30 | property alias bold: document.bold |
32 | property alias italic: document.italic | 31 | property alias italic: document.italic |
@@ -46,10 +45,6 @@ FocusScope { | |||
46 | document: edit.textDocument | 45 | document: edit.textDocument |
47 | selectionStart: edit.selectionStart | 46 | selectionStart: edit.selectionStart |
48 | selectionEnd: edit.selectionEnd | 47 | selectionEnd: edit.selectionEnd |
49 | onTextChanged: { | ||
50 | root.htmlEnabled = containsFormatting(); | ||
51 | root.htmlEnabled ? root.text = htmlText : root.text = plainText | ||
52 | } | ||
53 | cursorPosition: edit.cursorPosition | 48 | cursorPosition: edit.cursorPosition |
54 | } | 49 | } |
55 | 50 | ||