Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Character counter for WordPress editor
// handy if you write status posts and send them to Twitter
function akv3_editor_char_count() {
<script type="text/javascript">
(function($) {
wpCharCount = function(txt) {
$('.char-count').html("" + txt.length);
$(document).ready(function() {
$('#wp-word-count').append('<br />Char count: <span class="char-count">0</span>');
}).bind( 'wpcountwords', function(e, txt) {
$('#content').bind('keyup', function() {
add_action('dbx_post_sidebar', 'akv3_editor_char_count');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment