optimize rich text

This commit is contained in:
王劲鹏 2021-05-27 16:18:44 +08:00 committed by osborn
parent 861082dbac
commit 53184e483a
2 changed files with 8 additions and 1 deletions

View File

@ -124,7 +124,13 @@ Text {
transparentBorder: true
}
textFormat: TextEdit.AutoText
property var htmlText: false
onHtmlTextChanged: {
if (htmlText) {
textFormat = TextEdit.RichText
}
}
property var strikethrough: false

View File

@ -79,6 +79,7 @@ void DoricTextNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
view->setProperty("shadowOpacity", prop["opacity"].toDouble());
} else if (name == "htmlText") {
view->setProperty("text", prop.toString());
view->setProperty("htmlText", true);
} else if (name == "maxWidth") {
DoricLayouts *layout =
(DoricLayouts *)(mView->property("doricLayout").toULongLong());