summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js')
-rwxr-xr-xframework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js b/framework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js
new file mode 100755
index 00000000..8c419801
--- /dev/null
+++ b/framework/Web/Javascripts/source/tinymce-405/plugins/wordcount/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,i,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-]+/g),i=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount"},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," "),t=t.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," "),t=t.replace(i,"");var o=t.match(n);o&&(a=o.length)}return a}}); \ No newline at end of file