Jump to content
Violet

[Solved - existing feature] For the serious blogger - word count in CK Editor

Recommended Posts

There are a couple of small features that I feel are needed in ProcessWire for the serious blogger. One of these is a word count in CK Editor. When writing the body of a blog post, it can be a little frustrating not to know the current word count. (If you're not sure what I mean, take a look at this online editor just as an example https://html5-editor.net/  - the ongoing word count is displayed at the bottom right.) That sort of feature is built into the core of many other blogging platforms.

Writing the blog post directly in the editor is important, because if writing it in an Office program and copy-pasting it into the body field in Processwire, we can wind up with unwanted stuff in the html (like the font used, etc) - plus, it's not an elegant solution. Likewise, I find it frustrating doing what I currently do, which is writing in CK Editor and having to copy-paste into an Office program every so often, just to ascertain the word count.

Why is word count so important to bloggers?

  • When working with brands. When writing an article that's a sponsored post, usually the brand and the blogger have agreed upon a word count (e.g. 500+ words). That's quite a typical situation in the field, yet right now the CK Editor gives the author no info about the word count.
  • For SEO purposes for their own articles. The blogger may have a certain word count they are aiming for in an article, even if they are not working with a brand. Short articles don't always do as well on Google search results, so the blogger might be looking to create a longer article.

Writing without an ongoing displayed word count is rather hard on the process of writing. I can't describe it very well, but it really is hard. So, the ability to display the ongoing word count (to the author while writing) in the CK Editor is a feature I'd like to propose for the ProcessWire wish list.

Share this post


Link to post
Share on other sites

Also, there is a counter option built into PW for all textarea fields:

2019-06-23_163205.png.3bc45bd99580fbc2c76db4c88ede7006.png

2019-06-23_163424.png.4a5774a19bd15e427e3f0a007438e1ff.png

  • Like 8
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks @Robin S, somehow I thought the built-in one didn't work for CKEditors but it's not true. Just tried it and worked fine for a multi-language field as well, and showed the same values as the CKEditor plugin. According to the CKEditor plugin's documentation it offers more advanced configuration though.

  • Like 2

Share this post


Link to post
Share on other sites

Thank you @Robin Sand @tpr for taking the time to respond. I tried Robin's solution and worked beautifully thanks. It's working well, I've enabled that option in one of my sites and I'm about to do it for all of them. Even though I had gone through the field options in the body field, I somehow missed the "Counter" option! 😳  [facepalm moment]

I really appreciate this. I had no idea this feature was already in ProcessWire! So, no need to add it to wish list. Sorry! I will mark the thread as solved, and maybe a moderator would be kind enough to move it out of wishlist category... or is that something I can do myself? Anyway thank you both for solving the problem and hopefully anyone searching the forums will now see that this feature already exists.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...