paweljanicki / trumbowyg-counter Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
good!
Its possible to count the real chars of the html code?
Thanks !
I've spotted an issue with the word counter, and I'm not sure how to solve it (easily). The issue is that any code to strip HTML ends up concatenating words that are only separated by HTML tags.
For example:
<p>One</p><p>Two</p><p>Three</p>
This should result in a word count of 3, but because the text being returned from the element is OneTwoThree the word count is calculated as 1.
Any code that strips HTML will return the same result.
This is clearly a bug, but how does one fix it when it's so prevalent? Putting a space before each closing paragraph tag seems like a smelly hack.
https://stackoverflow.com/questions/73225259/calculating-word-count-after-stripping-html
I need to know the HTML chars count, not the edit window chars count.
Its possible?
THanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.