// Plugins must be enabled for the PDF viewer to work. <https://doc.qt.io/qt-5/qtwebengine-features.html#pdf-file-viewing>
webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true);
+ // Allow JavaScript to paste to (but not copy from) the clipboard with user interaction.
+ webEngineSettingsPointer->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, true);
+
// Update the blocked requests action.
connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::requestBlocked, [this, privacyWebEngineViewPointer] (const QVector<int> blockedRequestsVector)
{