---
title: "Code plugin"
description: "Edit your content's HTML source."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/code/"
md_url: "https://www.tiny.cloud/docs/tinymce/5/code/index.md"
version: "5"
last_updated: "2024-04-16T01:50:26Z"
tokens: 133
---
Important This page documents TinyMCE 5. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/code/).
# Code plugin

This plugin adds a toolbar button that allows a user to edit the HTML code hidden by the WYSIWYG view. It also adds the menu item `Source code` under the `Tools` menu.

## Basic setup

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'code',
  toolbar: 'code',
  menubar: 'tools'
});
```
