jodit / jodit-react

React wrapper for Jodit
MIT License
354 stars 118 forks source link

showCharsCounter not considering spaces and newlines #234

Open vickycena opened 1 year ago

vickycena commented 1 year ago

Jodit Version: 3.4.xxxxx

Browser: OS: Is React App:

Code

// A *self-contained* demonstration of the problem follows...

Hi, when I add the config showCharsCounter: true to display the char count in status bar It is using this regex (/[\s\n\t\r\uFEFF\u200b]+/g;) to get the count in stats.ts. Any reason why we are not considering spaces or new lines while calculating char count ?

Expected behavior:

Actual behavior: