# Code for Preventing Edit in Content Editor

**URL:** <https://community.hubspot.com/t/code-for-preventing-edit-in-content-editor/49681>\
**Category:** CMS Development\
**Tags:** design-manager, local-development, free, html, professional, enterprise, starter\
**Created:** [January 12, 2022, 8:16pm UTC](https://community.hubspot.com/t/code-for-preventing-edit-in-content-editor/49681 "2022-01-12T20:16:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PrasadKD](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@PrasadKD](https://community.hubspot.com/u/PrasadKD)\
**Post date:** [January 12, 2022, 8:16pm UTC](https://community.hubspot.com/t/code-for-preventing-edit-in-content-editor/49681/1 "2022-01-12T20:16:11Z")

</div>

I just use some modules in one of the page. I just coded it like this.

{% module ‘blog\_comments\_heading’  
path=‘@hubspot/header’,  
label=‘Blog comments heading’,  
header\_tag=‘h3’,  
value=‘Leave a Comment’  
%}

I want to prevent this from editing in Content editors. what code i have to add?

---

<div class="post-metadata">

**Author:** ![Oezcan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/oezcan/32/53959_2.png) [@Oezcan](https://community.hubspot.com/u/Oezcan)\
**Post date:** [January 13, 2022, 10:19am UTC](https://community.hubspot.com/t/code-for-preventing-edit-in-content-editor/49681/2 "2022-01-13T10:19:00Z")

</div>

Hey @PrasadKD

Unfortunately I couldn’t find anything that you need to add to prevent the content from being changed. But I have an alternative. To do this, you have to write your own module and just switch this on in the editing area.

1. 

 ![Oezcan_0-1642069070686.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/6/6683ba5cf64f4fde6d7c09179ba9bb932ebe82cd.jpeg)

1. 

 ![Oezcan_1-1642069097837.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/1/0193ff4479614c4d7a55c86b522406f6d82e9b32.jpeg)

3. And you link this module in your template.

![Oezcan_2-1642069306333.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/4/420bd3cee47123f0070edce71dd76d33e78d475e.png)

I hope,I hope I could help.

Best regards,

Özcan

---

<div class="post-metadata">

**Author:** ![Stephanie-OG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stephanie-og/32/73267_2.png) [@Stephanie-OG](https://community.hubspot.com/u/Stephanie-OG)\
**Post date:** [May 27, 2022, 1:20am UTC](https://community.hubspot.com/t/code-for-preventing-edit-in-content-editor/49681/3 "2022-05-27T01:20:42Z")

</div>

I know this post is kinda old but I came across it and figured I’d answer in case anyone else comes looking for the answer. You can use the `overrideable=false` parameter, so it’ll look something like this:

```lia-code-sample
{% module 'module_name'
 path='../modules/module-name',
 overrideable=false
%}

```

See the documentation [here](https://developers.hubspot.com/en/docs/cms/building-blocks/modules/using-modules-in-templates#parameters-available-for-all-modules) and I also wrote a quick post called [Prevent editing in content editors in coded HubSpot templates](https://www.stephanieogaygarcia.com/hubspot-website-development/prevent-editing-in-content-editors-in-coded-hubspot-templates) for reference.

* * *

**Stephanie O’Gay Garcia**

[Freelance HubSpot CMS Developer](http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity)

[Website](http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity) | [Contact](http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity)
