Add spoiler formatting to the quick format bar

This commit is contained in:
Joshua Goins
2025-05-08 14:53:47 -04:00
parent e232501715
commit d7c9bea783

View File

@@ -75,6 +75,25 @@ QQC2.Popup {
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
QQC2.ToolButton {
icon.name: "view-hidden-symbolic"
text: i18n("Spoiler")
display: QQC2.AbstractButton.IconOnly
onClicked: {
const format = {
start: "||",
end: "||",
extra: ""
};
formattingSelected(format, selectionStart, selectionEnd);
root.close();
}
QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
QQC2.ToolButton {
icon.name: "format-text-code"
text: i18n("Code block")