TextEdit and Markdown blank lines.
-
Hi,
TextEdit not showing empty lines in markdown format.TextEdit { id: sourceText font.bold: false font.pixelSize: sourceTextPixelSize horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter text: "1 line \n\n \n\n \n\n \n\n" + "2 line \n\n" + " " + "3 line \n" color: fontColor readOnly: false selectByMouse: true textFormat: TextEdit.MarkdownText wrapMode: Text.WordWrap layer.enabled: true anchors.fill: parent }
Based on the value of the text property, I should get several blank lines between lines 1 line and 2 line, but instead of that I get the text already in the next line.
How to fix it?
-
@EndrII-0 said in TextEdit and Markdown blank lines.:
Based on the value of the text property, I should get several blank lines between lines 1 line and 2 line, but instead of that I get the text already in the next line.
No, markdown syntax doesn't work like that.
Qt use the CommonMark format, if you want to add arbitrary new lines you can use an inline HTML tag:<br/>