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

qml Markdown format not working as expected

    XMLWordPrintable

Details

    • All

    Description

      Firstly, I want to start my report with a problem of lack of documantation. No documentation or any references to *Markdown, CommonMark*.

      Secondly, In qml it's not support all this tags, Instead of some tags, it leaves empty spaces.

      Thirdly, text doesn't mark  italic  and  bold  together, it marks only  bold and italic   instead off  bold and italic.

      import QtQuick 2.14
      import QtQuick.Controls 2.14
      import QtQuick.Window 2.14
      import QtQuick.Layouts 1.14
      
      Window {
          id: root
          visible: true
          width: 960
          height: 480
      
          QtObject {
          id: internals
          property string markdown_text: "*Italic* **Bold** ***Italic Bold***
      # Heading 1
      ## Heading 2
      [Link](http://a.com)
      * List
      * List
      * List
      - [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
      - [x] list syntax required (any unordered or ordered list supported)
      - [x] this is a complete item
      - [ ] this is an incomplete item
      
      >quote, not working
      Horizontal Rule not working
      ***
      `Inline code` with backticks not working
      ```
      # code block not working
      print '3 backticks or'
      print 'indent 4 spaces'
      ```
      "
      }
         RowLayout{
            anchors.fill: parent
      
            TextArea {
                id: te_output
                color: "black"
                Layout.fillWidth: true
                textFormat: TextEdit.MarkdownText
                text: internals.markdown_text
            }
            Text {
                id: t_output
                Layout.fillWidth: true
                textFormat: TextEdit.MarkdownText
                text: te_output.text
            }
         }
      }
      

      EDIT
      I don't know, do I need to write about this in this report, but in Qt Designer I haven't found MarkdownText in format menu.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-81306
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              brutalwizard BrutalWizard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes