> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to add custom config or JS for post editor?

- URL: https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/
- Published: 2017-09-08T15:31:37.248Z
- Updated: 2024-02-08T09:33:57.074Z
- Description: If you want to allow some custom tags in the TinyMCE editor - since Publii v.0.38.0 you can do it under site settings. In Publii…
- Author: Tomasz Dziuda
- Tags: Tutorials

If you want to allow some custom tags in the TinyMCE editor - since Publii v.0.38.0 you can do it under [site settings](https://getpublii.com/docs/website-settings.html#editors).

In Publii 0.18.2 we have added a new feature - you can add custom config and JS to the post editor directly from your theme.

In you theme config.json file, please add the following section:

```json
"extensions": {
        "postEditorConfigOverride": true,
        "postEditorCustomScript": true
 },
```

Then please add in the theme root directory the following files:

-   **tinymce.override.json** - it will allow you to override default TinyMCE configuration,
-   **tinymce.script.js** - it will run your JS code after post editor initialization.

Please remember that you can also override TinyMCE config globally by placing **tinymce.override.json** file in the Publii **config** directory - this override is overridden by the theme override if it exists.

You can modify both toolbars of the editor by adding or removing the available options. By default the toolbars include the following options:

```html
toolbar1: "bold italic underline strikethrough link unlink blockquote alignleft aligncenter alignright bullist numlist image gallery media table toc"

toolbar2: "styleselect formatselect searchreplace hr readmore removeformat undo redo restoredraft sourcecode "
```

E.g., you can remove the second toolbar of the editor by placing in TinyMCE.override.json file the following code:

```json
{
   "toolbar2": ""
  }
```

A list of all available TinyMCE editor options can be found [here](https://www.tiny.cloud/docs/configure/content-formatting/#built-informats). We do not guarantee that all of them will work with Publii.
