TextEdit: modifying selection format (weight, color..)
-
Hello,
Maybe didn't i understand how to use TextEdit's methods but i can't figure out how to modify the format of a simple selection. I was stuck on 3 issues:
- setting properties affect the whole document
- using selectedText returns a simple string (not a Text) that is not formatable
- selectionStart and selectionEnd returns indexes on formatted text, not raw data so that we can't manipulate the raw data to change selection's format.
After my investigation, i wonder if there is currently a way to change a selection's format. Tips would be very welcomed!
-
You are correct, there isn't currently a way to format a selection (or in general to do real rich text editing) with TextEdit. It's definitely something that should be addressed though -- could you please add a suggestion to the "bug tracker":http://bugreports.qt.nokia.com?
-
Here is the link to "QTCOMPONENTS-155":http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-155.
-
TextEdit is one of the core QML elements, so I've moved this to "QTBUG-13575":http://bugreports.qt.nokia.com/browse/QTBUG-13575. Thanks for filing the report!