The Permanent Pen allows a user to apply a pre-defined format (for example, color, typeface and type style, font, etc.) to a new content, overriding the default values set for that content area.
The Permanent Pen is useful when a distinct style text needs to be repeatedly added to the content. The user can pre-define the desired style in the Permanent Pen properties. This pre-defined style is applied to all the text entered into the document while the Permanent Pen is enabled. The ability to store information for reuse saves the user time and ensures consistency across the content.
The Permanent Pen can also be used to create user notes and other useful comments in a different format for easy identification. This allows the user to add text without modifying the original content.
The default properties of Permanent Pen are:
fontname: 'arial,helvetica,sans-serif',
forecolor: '#E74C3C',
fontsize: '12pt',
hilitecolor: '',
bold: true,
italic: false,
underline: false,
strikethrough: falseFor more information on {productname} formats, refer to the formats section.
There are two ways to access the Permanent Pen properties:
Add the Permanent pen properties option to the menu bar with the menu configuration.
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'permanentpen',
toolbar: 'permanentpen',
menu: {
format: { title: 'Format', items: 'configurepermanentpen' }
}
});Result: The Permanent Pen Properties dialog box appears.
|
Note
|
The Permanent Pen has to be enabled to access the Permanent Pen Properties dialog box by right-clicking the text. On the other hand, the menubar option can be accessed without enabling the Permanent Pen. |
-
Open the Permanent Pen Properties dialog box using any of the above methods.

-
Select the desired settings from the Font and Size drop-down menus.
-
To select the desired Styles, click on the checkbox next to Bold, Italic, Strikethrough, or Underline.
-
Choose the desired Text color.
-
Select the desired Background color
-
Press Ok to save or Cancel to dismiss.
Result: When the Permanent Pen is enabled, it will apply the new settings to the entered text.
The following example shows how to add the Permanent Pen toolbar button:
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'permanentpen',
contextmenu: 'configurepermanentpen',
toolbar: 'permanentpen'
});The Permanent Pen plugin provides the following {productname} commands.
