---
title: "Permanent Pen plugin"
description: "Apply formats while typing."
canonical_url: "https://www.tiny.cloud/docs/tinymce/5/demo-permanentpen/"
md_url: "https://www.tiny.cloud/docs/tinymce/5/demo-permanentpen/index.md"
version: "5"
last_updated: "2024-04-09T09:35:32Z"
tokens: 339
---
Important This page documents TinyMCE 5. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/).
# Permanent Pen plugin

## Interactive example

This example shows how to use Permanent Pen to apply a pre-defined format (color, typeface and type style, or font) to a desired section of content overriding the default values set for that content area. For more information on the Permanent Pen plugin, see the [docs](../permanentpen/).

**Example**

```js
tinymce.init({
  selector: 'textarea#permanent-pen',
  plugins: 'permanentpen code',
  contextmenu: 'configurepermanentpen',
  toolbar: 'permanentpen code',
  menubar: 'file edit view format table tools help',
  menu: {
    format: {
      title: 'Format',
      items: 'configurepermanentpen | bold italic underline strikethrough ' +
        'superscript subscript codeformat | formats blockformats fontformats ' +
        'fontsizes align | forecolor backcolor | removeformat'
    }
  },
  permanentpen_properties: {
    fontname: 'arial,helvetica,sans-serif',
    forecolor: '#E74C3C',
    fontsize: '12pt',
    hilitecolor: '',
    bold: true,
    italic: false,
    strikethrough: false,
    underline: false
  },
  height: 500,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```
