optimize rich text
This commit is contained in:
parent
861082dbac
commit
53184e483a
@ -124,7 +124,13 @@ Text {
|
|||||||
transparentBorder: true
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
|
|
||||||
textFormat: TextEdit.AutoText
|
property var htmlText: false
|
||||||
|
|
||||||
|
onHtmlTextChanged: {
|
||||||
|
if (htmlText) {
|
||||||
|
textFormat = TextEdit.RichText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
property var strikethrough: false
|
property var strikethrough: false
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ void DoricTextNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
|
|||||||
view->setProperty("shadowOpacity", prop["opacity"].toDouble());
|
view->setProperty("shadowOpacity", prop["opacity"].toDouble());
|
||||||
} else if (name == "htmlText") {
|
} else if (name == "htmlText") {
|
||||||
view->setProperty("text", prop.toString());
|
view->setProperty("text", prop.toString());
|
||||||
|
view->setProperty("htmlText", true);
|
||||||
} else if (name == "maxWidth") {
|
} else if (name == "maxWidth") {
|
||||||
DoricLayouts *layout =
|
DoricLayouts *layout =
|
||||||
(DoricLayouts *)(mView->property("doricLayout").toULongLong());
|
(DoricLayouts *)(mView->property("doricLayout").toULongLong());
|
||||||
|
Reference in New Issue
Block a user