Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106225

Formatting text document failure in rich text editor example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2, 6.3.0
    • GUI: Text handling
    • None

    Description

      In the example project "Qt Quick Controls - Text Editor", it is shown how to use TextArea to create a very basic rich text editor in QML. One issue I've encountered with this example is that the formatting of text fails when either the TextArea is empty or when the cursor points at a location in the text document after a space. For example, if you run the example, delete all text and then click "B" (or press Ctrl+B) nothing happens and typing doesn't result in bold text. If on the other hand, you type something and then click "B", the formatting is correctly applied.
      This happens with all the other formatting options too.

      It seems that DocumentHandler::mergeFormatOnWordOrSelection fails to merge the character format whenever the text document is empty or the cursor is not located at a non-empty word.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            daljit97 Daljit Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes