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

QTextEdit: when pasting into a code block, the format is lost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.2.0
    • GUI: Text handling
    • None

    Description

      If you set properties like QTextFormat::BlockCodeLanguage and QTextFormat::BlockCodeFence on a block to create a code block interactively, and then paste some code into it (control-V), the properties are lost. The clipboard text may have its own formats (for example if you paste from Creator, Konsole etc., it's not just plain text).

      But even if you manage to paste without losing the block format on the first line, it's still lost on subsequent lines. So in practice the user needs to reselect the text and apply the code block style afterwards, assuming the application has a style combobox.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes