Adds a toolbar button for inserting special characters and HTML entities from a configurable grid.
Click Special Characters in the toolbar and pick a character from the grid. The character is inserted at the caret.
<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/special-chars/special-chars.js"></script>
const app = Redactor('#entry', {
plugins: ['specialChars']
});
boolean)
truetrue, adds the button to the context toolbar as well.string)
string[])
SpecialCharsPlugin.defaultOptions.items for the built-in set.Redactor('#entry', {
plugins: ['specialChars'],
specialChars: {
items: ['©', '®', '™', '—', '•', '→']
}
});
en: {
specialChars: {
'special-chars': 'Special Characters'
}
}
This plugin does not emit events.
Inserts a special character at the caret and closes the dropdown.
Parameters:
character (string) — HTML entity or character string to insert.app.specialChars.insert({ character: '©' });