Limit

Limits the maximum character count of plain editor text. Blocks further typing and paste when the limit is reached. Shows current length in the status bar.

Counts text the same way as the Counter plugin (whitespace normalized). Navigation and delete keys still work at the limit.

Load the bundle

<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/limit/limit.js"></script>

Initialization

const app = Redactor('#entry', {
    plugins: ['limit'],
    limit: {
        limit: 200
    }
});

Options

  • limit (number | false)
    • default false
    • Maximum character count. The plugin is inactive when false, null, undefined, or 0.
Redactor('#entry', {
    plugins: ['limit'],
    limit: {
        limit: 500
    }
});

Events

This plugin does not emit events.

API

This plugin does not expose a public API.