Documentation / Settings

Pre

template #

Type: String

Default: <pre></pre>

With this setting, you can change the pre block template, for example:

Redactor('#entry', {
    pre: {
        template: '<pre><code></code></pre>'
    }
});

spaces #

Type: Number

Default: 4

This setting allows you to specify the number of spaces when you press tab in a pre block.

Redactor('#entry', {
    pre: {
        spaces: 2
    }
});

disable #

You can completely disable adding pre, for this set the setting to false.

Redactor('#entry', {
    pre: false
});