We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Extension to show # of chars/words for current field in edit screen?

Development and Programming

ms's avatar
ms
274 posts
17 years ago
ms's avatar ms

A friend of mine asked for some addon that shows the number of typed characters/words on the fly when editing an entry. Seems that Live Writer has an plugin to do so and he would love to have the same functionality when adding/editing entries via the EE control panel.

Seems some JavaScript together with some CSS for a floating box should do the trick, but I miserably failt over the holidays to develop some extension that would work. Any ideas on how to develop thus an addon? Or this something like this already available? Thanks in advance.

.Markus

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

Javascript is the method I would use. I don’t know of anything that does it yet. But the means are there with the publish form extension hooks.

Jamie

       
chrispiciullo's avatar
chrispiciullo
69 posts
17 years ago
chrispiciullo's avatar chrispiciullo

I’m not sure if this helps, Markus, but there was a word count extension released a while ago. Pretty much does what’s advertised and shows a word count for each field in the publish and edit screens at the upper right area of each textarea.

The extension works fine with 1.6.1 however, if you’re using the Textarea Resizer extension then no word count will display. Unfortunately, the extension seems to be abandoned, but Solspace did tweak a lot of the code for his own use. Maybe we can persuade him to post it up if the original author doesn’t mind. :cheese:

Regards, Chris

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
17 years ago
Andrew Weaver's avatar Andrew Weaver

I wrote this extension for a client once and it may work for your needs.

It was designed to provide a (soft-)limit on the number of characters in a field. It didn’t impose the limit it just showed the author how many characters and words they had used, and how many they had left. However, if you set the limit to zero, it provided a normal character and word-count.

The extension allows you set up which fields have a character count/limit. (By default, the count does not show).

[EDIT: added screengrab]

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Andrew,

Is there any way of getting this to work in Safari at all? Works great in Firefox but no text shows above the boxes in Safari?

Best wishes,

Mark

       
ms's avatar
ms
274 posts
17 years ago
ms's avatar ms

Andrew, his is great news! Thanks a lot - I’ll give it a try over the weekend. Looks very promising 😊

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
17 years ago
Andrew Weaver's avatar Andrew Weaver

Mark,

Its working on Safari for me. Can you let me know which version you are having problems with?

Thanks - Andrew

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen
Mark, Its working on Safari for me. Can you let me know which version you are having problems with? Thanks - Andrew

Hi Andrew,

Please ignore me. I had another extension installed that was interfering with this one. Disabled that extension and it all works now.

Fantastic add on to EE!! 😊

Best wishes,

Mark

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
17 years ago
Andrew Weaver's avatar Andrew Weaver

Thanks Mark. Out of interest, which extension was it? I’ll see if it was anything I was doing…

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Andrew,

Very good question!!! I’ve unfortunately been asleep since then so my memory might not serve me as well as it could do! 😊

EDIT: Just took a look. Thought I had disabled and deleted it but had just disabled it so it jogged my memory!! 😊

It was actually the Live Word Count extension.

Hope that helps.

Best wishes,

Mark

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.