This example shows how to add predefined CSS classes to tags and blocks.
<div id="entry-predefined-classes"></div>
const app = Redactor('#entry-predefined-classes', {
classes: {
tags: {
p: 'doc-text'
},
blocks: {
heading: 'doc-title',
}
},
content: [
'<h2>Predefined classes</h2>',
'<p>These classes are injected into matching tags.</p>'
].join('')
});