# Is an easy way to protect text content?

**URL:** <https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092>\
**Category:** Elements\
**Created:** [March 14, 2026, 2:27pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092 "2026-03-14T14:27:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SWebbing](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SWebbing](https://forums.realmacsoftware.com/u/SWebbing)\
**Post date:** [March 14, 2026, 2:27pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/1 "2026-03-14T14:27:23Z")

</div>

Wondering if there is an easy way to protect content?

In stacks I used a plugin (Defender I think?) that protected my text from being copied and pasted. The content could still be grabbed from the web inspector, but it was a good initial deterrent for those without further skills and know how. Is there a way to do this in Elements?

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [March 14, 2026, 3:26pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/2 "2026-03-14T15:26:58Z")

</div>

As you know this is certainly not fool-proof, and will only stop VERY casual copying of your website text.

Here’s how to “protect” text content on your website.

1. Add a `no-copy` class to any text components that you want protected.

 ![CleanShot 2026-03-14 at 3 .15.38@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/7/5/75de741d4a0f4cb5d81dc2b42e6a64681208f946.jpeg)

1. Add the following no-copy class to the “Edit Page Code” area of the page(s):

```auto
.no-copy {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

```

 ![CleanShot 2026-03-14 at 3 .16.23@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/c/a/cab17841eb691ee450dc055a17a6e9c6c0c88a50.jpeg)

1. Optionally, you can add the following Javascript to the JS tab in the “Edit Page Code” area of the page(s). This will stop users from being able to right-click on the page.

```auto
document.addEventListener("contextmenu", e => e.preventDefault());

```

 ![CleanShot 2026-03-14 at 3 .17.54@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/c/a/ca7a35428fa0ffcb8e7425d79cb2fa466e2ff33b.jpeg)

Hope that helps, and do let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![SWebbing](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SWebbing](https://forums.realmacsoftware.com/u/SWebbing)\
**Post date:** [March 14, 2026, 3:43pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/3 "2026-03-14T15:43:41Z")

</div>

Hi @dan, many thanks for this. I have an html “app” that I have built (with some AI help!) I am going to try adding to one of my pages. I know it can be copied but I figure if I put in a first line of defence it sends out a message to say “no, no, no, I know what you are up to here” 🤣 I will give your suggestions a go and come back if I get lost (highly possible!)

---

<div class="post-metadata">

**Author:** ![PLM](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/plm/32/31094_2.png) [@PLM](https://forums.realmacsoftware.com/u/PLM)\
**Post date:** [March 14, 2026, 4:31pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/4 "2026-03-14T16:31:55Z")

</div>

Both 1 and 2 on a page work, thanks.

I also put 3 on the page for better protection. @dan

But there are ways to get around all 3 …

---

<div class="post-metadata">

**Author:** ![SWebbing](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SWebbing](https://forums.realmacsoftware.com/u/SWebbing)\
**Post date:** [March 14, 2026, 5:51pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/5 "2026-03-14T17:51:27Z")

</div>

Brilliant - it worked (used 1 & 2). Thanks so much 😀 AND just to add I tried the third option on a test page and that worked too - text could be highlighted and no right click.

---

<div class="post-metadata">

**Author:** ![PLM](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/plm/32/31094_2.png) [@PLM](https://forums.realmacsoftware.com/u/PLM)\
**Post date:** [March 14, 2026, 6:00pm UTC](https://forums.realmacsoftware.com/t/is-an-easy-way-to-protect-text-content/55092/6 "2026-03-14T18:00:29Z")

</div>

Any similar tricks for photos using Lightbox? @dan
