succinct icon indicating copy to clipboard operation
succinct copied to clipboard

Show Max Characters & How Many Left Are Allowed

Open abaney opened this issue 12 years ago • 2 comments

It would be nice to be able to show how many characters are allowed, and how many characters remain available. For example, someone would be typing in a textbox to leave a comment, and it would be useful to limit the characters in their comment.

abaney avatar Jan 14 '14 14:01 abaney

Although tangentially related, this issue is quite a different problem than what succinct is aiming to solve.

On the front-end, the ability to truncate text is somewhat limited. If you need to truncate text to single line and have a specified width, that problem can be solved by using plain 'ol CSS. However, if you need to truncate multiple lines of text, there are no ready-made solutions. The aim for Succinct is to try and mitigate that issue.

In regards to your suggestion, couldn't the max character count simply be supplied in HTML, i.e. <span>200 characters allowed</span>?

Showing how many characters are left is quite different functionality than Succinct, since that requires watching the DOM for changes and keeping track of those changes. Sure, this can be done easily, but I don't think this functionality should be included in Succinct. This would weigh down the plugin for people who don't need that functionality (since that's not part of the main problem Succinct is trying to solve.)

Definitely worth looking at creating a separate plugin with that functionality and can integrate with Succinct seamlessly though.

micjamking avatar Jan 14 '14 20:01 micjamking

I understand what you mean with your plugin. I'm sure there are other solutions I could find online. Thank you for your response.

abaney avatar Jan 15 '14 14:01 abaney