Arandano Posted April 18, 2021 Posted April 18, 2021 My site uses v7.0. I was successful in blocking text selection for the whole site by injecting this code to "Code Injection": Quote <script> function disableselect(e) { return false; } function reEnable() { return true; } document.onselectstart = new Function("return false"); if (window.sidebar) { document.onmousedown = disableselect; document.onclick = reEnable; } </script> However, this did not work for the embedded Google Docs document and I was able to select the text inside both the code block and the embed block. I've also tried finding a solution from the Google Docs side, but there doesn't seem to be a way to stop this. Any suggestions?
Rasmus_SparkPlugin Posted April 18, 2021 Posted April 18, 2021 1. Add this to ”Custom CSS”: .disable-select { -webkit-touch-callout: none; user-select: none; } 2. Add this class to the embed code (iframe tag), should look something like this: <iframe class=”disable-select”> Let me know if it works😊 - Rasmus Myhrberg, Founder of sparkplugin.com
Arandano Posted April 19, 2021 Author Posted April 19, 2021 Hi Rasmus, thanks for your answer. I tried it, but it didn't have the wanted effect. user-select is active, but I can still select the text inside the embedded code block.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.