Thread tagged as: Problem

Redactor and Word & Chars count / Limits

A very minor problem: Can it be that redactor fields don't play along nicely with the "count" and (max) "words" (or chars) feature?

<perch:content id="maintext" label="Main text" type="textarea"  editor="redactor" html="true" size="l" count="words" words="50" />

The count is only updated on save, nearly accurate (differing by 2 words) - not while typing. The word limit is not respected.

Here are my settings:

Perch Runway: 2.8.21, PHP: 5.6.10, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO Server OS: Darwin, cgi-fcgi Installed apps: content (2.8.21), assets (2.8.21), categories (2.8.21), collection_2 (2.8.21)

Urs Bräm

Urs Bräm 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd need to use a Redactor plugin for that. We can only count text-based fields, not HTML fields.

I was quite sure that next to the counter, there was also a maxlength limiter, but words=50 or chars=50 don't output a maxlength attribute (or similar data-attribute) - did I make them up?

Drew McLellan

Drew McLellan 2638 points
Perch Support

words="50" (note the required quotes) limits output, not input. It's useful for creating a teaser or something like that.

I see - thanks!