Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputRichTextFSC - remove html from character count in #1569

Conversation

djtoohey
Copy link
Contributor

@djtoohey djtoohey commented Aug 1, 2024

Howdy, we found that it was confusing for users that the character count did not match what was being written.
The current character count for inputRichTextFSC was including HTML characters that were not visible to the user.
We introduced a regex that would remove anything between < and > from the character count.

Only downside is that the field that the text area is linked to needed to be increased to handle for this change.
For that reason, I'm not 100% sure if this is something that people have been wanting. But here it is 😄

Maybe add a new attribute to the component to include the html characters in the character count or not?

@djtoohey
Copy link
Contributor Author

djtoohey commented Aug 1, 2024

Update: have added in a new attribute to the component that determines if HTML characters are to be included in the word count.

@ericrsmith35
Copy link
Collaborator

@djtoohey I like your enhancements but they shouldn't change the default behavior of the component for places where users have already implemented an earlier version. Please change the attribute to something like Exclude HTML Characters from the Count. This way, a default value of false will make the component behave the same way as it did before your changes.

@djtoohey
Copy link
Contributor Author

djtoohey commented Aug 2, 2024

@ericrsmith35 good point, have made the changes necessary.

@alexed1
Copy link
Owner

alexed1 commented Sep 21, 2024

Thanks, Declan! This is a nice enhancement that increases accuracy.

@alexed1 alexed1 merged commit ec7bbd5 into alexed1:master Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants