Jump to content

Embed-block: How do I disable text selection?

Recommended Posts

My site uses v7.0. I was successful in blocking text selection for the whole site by injecting this code to "Code Injection":


  function disableselect(e) {
    return false;

  function reEnable() {
    return true;

  document.onselectstart = new Function("return false");

  if (window.sidebar) {
    document.onmousedown = disableselect;
    document.onclick = reEnable;

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?

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.