urvanov_syntax_highlighter.min.js?ver=2.8.40:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘writeText’) at J.copyPlain (urvanov_syntax_highlighter.min.js?ver=2.8.40:1:13921) at HTMLDivElement. (urvanov_syntax_highlighter.min.js?ver=2.8.40:1:8549) at HTMLDivElement.dispatch (jquery.min.js?ver=3.7.1:2:40035) at v.handle (jquery.min.js?ver=3.7.1:2:38006)
J.copyPlain = function(ak, al) { if (typeof B[ak] == “undefined”) { return aa(ak) } var aj = B[ak].plain; var ai = aj[0].value; navigator.clipboard.writeText(ai).then(function(am) { return I(ak, H.copy) }); return false }
In this code
base.copyPlain = function (uid, hover) {
if (typeof urvanov_syntax_highlighters[uid] == 'undefined') {
return makeUID(uid);
}
var plain = urvanov_syntax_highlighters[uid].plain;
Clipboard is available only in HTTPS. I think you host your site on localhost with HTTP or somewhere else with HTTP. So, copy button will not work this way.