mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 21:29:01 -04:00
Spoiler feature
Select text to hide, then right click --> Spoiler
This commit is contained in:
parent
cdda411c79
commit
5a8f74ce99
4 changed files with 51 additions and 0 deletions
|
@ -231,6 +231,8 @@ void MimeTextEdit::contextMenuEvent(QContextMenuEvent *e)
|
|||
|
||||
/* Add actions for pasting links */
|
||||
contextMenu->addAction( tr("Paste as plain text"), this, SLOT(pastePlainText()));
|
||||
QAction *spoilerAction = contextMenu->addAction(tr("Spoiler"), this, SLOT(spoiler()));
|
||||
spoilerAction->setToolTip(tr("Select text to hide, then push this button"));
|
||||
contextMenu->addSeparator();
|
||||
QAction *pasteLinkAction = contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste my certificate link"), this, SLOT(pasteOwnCertificateLink()));
|
||||
|
@ -268,3 +270,8 @@ void MimeTextEdit::pastePlainText()
|
|||
{
|
||||
insertPlainText(QApplication::clipboard()->text());
|
||||
}
|
||||
|
||||
void MimeTextEdit::spoiler()
|
||||
{
|
||||
RsHtml::insertSpoilerText(this->textCursor());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue