Salesforce Fact #815 | Wordcount logic in LWC

We can create a simple word count logic for a long text area in LWC using some JS logic.

Note: This doesn't cover consecutive spaces.

Reference: https://salesforce.stackexchange.com/questions/66249/word-count-formula#:~:text=Here%20we%20are%20counting%20the,%2C%22%20%22%2C%22%22))

Attached are the screenshots.





Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow