Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.

Commit

Permalink
Fixed ckeditor#91
Browse files Browse the repository at this point in the history
  • Loading branch information
w8tcha authored and Mathijs den Burger committed Feb 13, 2017
1 parent dd6b00f commit 2c4600a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin.js
Expand Up @@ -136,7 +136,7 @@ CKEDITOR.plugins.add("wordcount", {

function countCharacters(text, editorInstance) {
if (config.countHTML) {
return (editorInstance.getSnapshot().length);
return (text.length);
} else {
var normalizedText;

Expand Down Expand Up @@ -344,8 +344,8 @@ CKEDITOR.plugins.add("wordcount", {
if (config.maxWordCount > 0 || config.maxCharCount > 0) {

// Check if pasted content is above the limits
var wordCount = 0,
charCount = 0,
var wordCount = -1,
charCount = -1,
text = event.editor.getData() + event.data.dataValue;


Expand Down

0 comments on commit 2c4600a

Please sign in to comment.