I have HtmlBox 4.0.3 from Remiya on a Joomla website and would like to know how (if possible) I would be able to limit the amount of chars/words entered into the textarea of HtmlBox.
I’ve already managed to limit the chars/words on a plain html textarea but HtmlBox is written completely in jQuery and I don’t even know where to start.
Any help much appreciated,
Chris
Here’s a really basic example of what you could do:-
Obviously you need to replace
#yourHtmlBoxIdand#charCountwith the relevant selectors.Some example markup:
Here’s a fiddle for you to play with
Just bear in mind that this is by no means bullet proof, it works on the
keyupevent, so for example if somebody copy/pasted into the textarea via mouse buttons the jQuery would never be triggered. This should point you in the right direction though.