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

Fix #125 Add characters count to status bar #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NicoHood
Copy link

It turns out to be pretty easy to add a character count. I was quite a bit surprised why this was not yet added, as the css already existed:
https://github.com/NicoHood/easy-markdown-editor/blob/master/src/css/easymde.css#L222-L224

@Ionaru
Copy link
Owner

Ionaru commented Feb 20, 2021

Will need some documentation in the README and typings.

@NicoHood
Copy link
Author

NicoHood commented Apr 15, 2021

I just found out, that the character count is wrong. Html textareas will always send with \r\n, while the javascript only counts \n:
https://stackoverflow.com/questions/14217101/what-character-represents-a-new-line-in-a-text-area

Edit: It turns out to make most sense to fix that in the framework, not the javascript. It's been fixed in grav, which I am using. This means this PR is still working properly :-)
getgrav/grav#3324

@NicoHood
Copy link
Author

What do you mean by typings? Do I can get that ready.

@vanillajonathan
Copy link
Contributor

Is this characters with or without the markup?

The markdown string *Hello* is technically 7 characters, but the human text is 5 characters.

@NicoHood
Copy link
Author

I it with markup, so a bit larger than the text itself.

@BoPeng
Copy link

BoPeng commented Feb 13, 2023

I am looking for the same feature and would like to see this PR merged.

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.

4 participants