Sentence Length

Adds a Sentence Length toolbar button that analyzes sentence length distribution and highlights sentences in the editor by category (short, optimal, medium, long, too long).

Opens a chart panel with percentage bars. Highlights are stripped on export via output:before:html.

Load the bundle

<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/sentence-length/sentence-length.js"></script>

Initialization

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

Sentence categories

Label Key Word count
1–8 short ≤ 8
9–15 optimal ≤ 15
16–22 medium ≤ 22
23–30 long ≤ 30
31+ tooLong > 30

Reference

Settings · API