In some forms wer have limits how many characters can be entered. When typing, the user has no clue how many characters he actually entered, he just gets an error when he typed too much.
The problem gets worse as on the server the count includes the HTML markup while the user only sees the character he types. E.g. when adding a table, a lot of markup is added that count for the limit as well.
The goal of this issue is to improve the situation for the user and give him a glimpse on how much space his text uses.
The best solution seems to be to show the actual character count including the HTML markup. By adding a help bubble we probably can explain why this is not the same as the user visible character.
- Add this plugin https://gist.github.com/321zeno/f9105f7865b2b2f7097d (did some test locally and the plugin works well)
- Change the plugin to count the markup as well, maybe don't trigger it after every keyup
- Make it aware of the limit of the element and add a css class when the limit is reached (e.g. char count text will get red)
Alternatively we could count only user displayable texts and reserve the double amount of space on the database tables to be on the save side.