Feature Request: Word Count for the Editor views

Can we get a word count feature for editor views? Please?

Or will I have to create a “bookmarklet” (javascript in bookmark button) to implement myself? Then share it with the community?

3 Likes

Hi Alfe! :waving_hand: This feature is definitely on our radar as well!

There is a bit of a trick in implementing this so it supports languages other than English too. There has been some recent work done in browsers that looks very promising but it’s still pretty early.

If you do decide you want to make a bookmarklet we’d love to see a showcase of it here!

2 Likes

So create a bookmark on your toolbar and cut and paste the following in the URL field. You have to be in the editor screen

javascript:(function () { alert("Word count: " + (document.querySelector("iframe[src^=blob]").contentWindow.document.querySelector(".ProseMirror").textContent.match(/\S+/g)?.length));})()

Here is a sample of what it should look like.

2 Likes