wpcomposer/wysiwyg-character-count

Character counter for the WordPress WYSIWYG

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

0.0.4 2018-04-18 10:09 UTC

This package is not auto-updated.

Last update: 2024-09-20 03:00:13 UTC


README

A WordPress plugin that counts characters in the WYSIWYG editor.

Why a character counter?

Currently there is no character counter for the WYSIWYG. Having one is helpful for editors and content creators.

Pre-requisites

Setup

{
    "require": {
        "wpcomposer/wysiwyg-character-count" : "0.*"
    }
}
composer require wpcomposer/wysiwyg-character-count

Usage

Register the character counter.

> theme-folder/functions.php
<?php 

use WCom\WYSIWYG\WYSIWYG;

WYSIWYG::registerCharacterCount();

Why not just activate the plugin - which turns on the counter?

Good point. I'll decide in version 1.0.0 whether to automatically have character counting when the plugin is active.

Currently, the counter will work with the above code, even if the plugin is not active, which feels wrong.

MU-Plugin Instead

If you want to turn it into a mu-plugin, use a WordPress Autoloader.

Isn't there a Word Counter

Yes there is. However, whilst editorials require number of words, usually developers restrict by number of characters.