Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.2
-
None
Description
If a tag (e.g. "<b/>") is used within a CSS comment in a "style"-section of the text set in TextEdit, the CSS formatting doesn't work anymore.
import QtQuick Rectangle { TextEdit { id: myTextEdit textFormat: Text.RichText Component.onCompleted: { // if "b" of "<b/>" is removed, the background color is working. myTextEdit.text = '<style type="text/css">/*<b/>*/span { background: #1d2331; color: #d4d2c8 }</style><span>bug</span>' } }
If the related CSS code is loaded from a separate CSS file, the bug doesn't occur.
E.g.
myTextEdit.text = '<link rel="stylesheet" type="text/css" href="bug.css"/><span>bug</span>'
and bug.css containing:
/*<b/>*/span { background: #1d2331; color: #d4d2c8 }