How To Hide Content Editor Web Part

With web content editing moving towards being done in rich editors like Microsoft’s React, Slack, and Discord have made it mainstream. These rich editor platforms allow for easier content creation than using HTML directly.

By adding components such as reorderable lists or image galleries, users can now create their own pages and pages of content quickly and efficiently.

However, one downfall of these rich editors is that you cannot easily remove or hide parts of them. For example, if someone wanted to edit an article they would need to either use the browser built-in interface or another similar website with a less intuitive user experience.

This can be annoying if you want to test how well the platform works before letting people use it, or if you do not feel comfortable having full access to the site.

Luckily there are some ways to fix this by hiding different parts of the rich editor. This tutorial will show you how to do so for both Discourse and WordPress.

Discord: Hiding Parts
We will focus on Discord here, but most of what we talk about applies to Discourses too!

If you already have a free account you can simply import your existing data into the new version.

Locate and delete the content editor web part

The next step in hiding this element is to locate the content editor web part. You can do this by going through each section of your site first, or you can go directly into Site Settings -> Look and Layout -> Content page layout mode = Basic. This will show all sections including the content editor web part.

Once found, click on it to bring up the settings for that specific web part. Then, under Hidden, select either “Yes” or “No”. For our purposes, we will opt for no so it does not display.

Save your changes

In this article, we will be going through all of the steps to remove the rich editor content web part from pages that contain it. If you have done everything correctly, then there should not be anything resembling the rich editor anywhere on the page!

We will also go into detail about how to prevent this web part from re-appearing in future. Once again, if you have performed these steps properly, then the tool should work for you and never reappear.

Removing the rich editor content type is very similar to removing any other web part so if you are familiar with how to do that, then you can just copy and paste those steps here instead. All of the tools used in this article are available free of cost.

Once completed, your users will no longer able to use the rich editor feature on your website! Keep an eye out for our next blog post where we will show you some cool ways to replace the rich editor.

Create a new content editor web part

The next step is to create a new content editor website home page or library view item using the content editor web part as a template. You will want to rename this newly created content editor web part to be less descriptive so it does not identify what content type it is for.

I would suggest “Content”, “Editorial article”, or something similar that does not give away the true purpose of the web part.

Once you have completed that process, you can now begin editing the settings for this new content editor web part. These settings include:

Removing any branding or logos related to the original content editor web part

Changing the title to match the rest of your site titles

Creating new menus under which to place the content editor web part

Editing the CSS or JavaScript file to completely remove anything content-related

In our case, we are going to edit the last option. By removing all references to the content editor web part from the editorialarticle.css or editorialarticle.js files, users will be unable to configure or use the content editor web part.

Add content to the new web part

There are several ways to hide this component, so it is important to know what methods work for your site. Some of the most common ways to disable this component include disabling the menu or tool bar, hiding the toolbar with CSS, and removing the web part through XML editing.

It is very easy to do all three of these in SharePoint Online! To add more content such as lists, documents, and pages to the new web part, simply navigate to the element you would like to edit using any one of the mentioned method. After finding the item, click “Edit” next to its action button to open up the settings panel. You can now toggle whether or not the new web part will show content.

General Settings
There are some general settings that apply to every web part in Office 365. For example, you can determine if the new web part should be responsive or mobile-friendly. This setting is under the Mobile Experience (O365) section. By default, it is set to yes, but you can change this to no if needed.

Mobile Experience (O365)
By default, the Responsive Mode option is enabled for the new web parts. If there is something you want to disable, go into the General Settings area and find the Mobile Experience drop down. Simply uncheck the box beside Responsive mode to turn off the feature.

Link the two web parts together using JavaScript

There are several ways to link these two web part types together, but one of the most common is by creating a custom function in JavaScript.

A very popular way to do this is using an OnPreRender method. Within that method, you can set up your link for when the second web part is displayed or hidden.

When the content editor web part is not visible, there is no need to show the rich editing features, so keeping it open would be wasteful processing time.

Similarly, if the read-only web part is closed, then there is little reason to include the viewer mode setting as well. This way users will still have access to some limited functionality, but they will get the best experience possible without having to work around any limitations.

Confirm that everything appears as expected

If you perform this steps correctly, you should have no issues hiding or showing the web part. However, it is important to confirm that nothing else has been changed along with the web part itself before moving onto the next step.

If there are any changes made to the rest of the site after editing the web part, these may re-display the content item. It is best to make sure all settings are consistent before moving forward.

You can also clear your browser cache and refresh pages to see if the change worked properly. In some cases, the cached version may be keeping the old setting active.

Removing an embedded content editor web part removes the specific web page element completely. There is not much you can do to recover deleted content unless someone saved it in another way.

Restart your browser

In some cases, you may need to completely restart your web browser in order to apply the changes made to this article. It may also help if you update your browser settings or clear your cookies.

If none of these work, try clearing your cache by clicking “Show all files” under File-> Settings -> Privacy and Security -> Site Collection-Level Cache. Then click Tools -> Empty Browser Cache (Note: You will lose any open pages and tabs after doing so). After that, refresh the page where the content editor is located to see the effects!

Once again, we hope you enjoyed reading about how to hide the Content Editor Web Part in SharePoint Online and Microsoft Teams. For more tips and tricks, be sure to read our collection of articles here at

Test to be sure that everything is working correctly

It is important to make sure that you have removed all instances of the content editor web part before completing this task. If there are any left, they will automatically re-appear when you run these steps!

To test if your changes worked, login to your site as an administrator and go into Settings > All pages and folders. You can then open the page or folder where the content editor web part was and it should no longer exist.

If it does, repeat the step above to find out what has been configured incorrectly.

About The Author

Juice Staff Writer
Juice is a web app that harnesses the power of AI to generate awesome SEO-friendly content right on your website or e-commerce store. This powerful yet simple tool that enables you to easily and quickly generate content focused on your niche topic.
Juice Beta is ending July 1st! Subscribe before end of month to lock in Juice Plus for 50% off!
$49 $25
Sign up now
Juice Beta is ending soon! Subscribe now to lock in Juice Plus for $49 $25
Sign up now