summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/qml/TextEditor.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml
index 8a298989..724ee03f 100644
--- a/framework/qml/TextEditor.qml
+++ b/framework/qml/TextEditor.qml
@@ -42,11 +42,16 @@ FocusScope {
42 Kube.DocumentHandler { 42 Kube.DocumentHandler {
43 id: document 43 id: document
44 document: edit.textDocument 44 document: edit.textDocument
45 cursorPosition: edit.cursorPosition
46 selectionStart: edit.selectionStart 45 selectionStart: edit.selectionStart
47 selectionEnd: edit.selectionEnd 46 selectionEnd: edit.selectionEnd
48 //textColor: colorDialog.color 47 //textColor: colorDialog.color
49 onTextChanged: root.htmlEnabled ? root.text = htmlText : root.text = plainText 48 onTextChanged: root.htmlEnabled ? root.text = htmlText : root.text = plainText
49
50 cursorPosition: edit.cursorPosition
51 onCursorPositionChanged: {
52 //Only necessary to skip over invisible char
53 edit.cursorPosition = cursorPosition
54 }
50 } 55 }
51 56
52 Kube.ScrollHelper { 57 Kube.ScrollHelper {
@@ -62,10 +67,8 @@ FocusScope {
62 focus: true 67 focus: true
63 anchors.fill: parent 68 anchors.fill: parent
64 selectByMouse: true 69 selectByMouse: true
65 persistentSelection: true
66 wrapMode: TextEdit.Wrap 70 wrapMode: TextEdit.Wrap
67 textFormat: Qt.RichText 71 textFormat: Qt.RichText
68 cursorPosition: document.cursorPosition
69 } 72 }
70 TextArea.flickable: edit 73 TextArea.flickable: edit
71 } 74 }