Sha256: bdb623e398a63b0f2c21f80f962ae12429c3d9a4b7ecd20f4af9b81f2b10f2e5

Contents?: true

Size: 929 Bytes

Versions: 39

Compression:

Stored size: 929 Bytes

Contents

tinymce.PluginManager.add("wordcount",function(a){function b(){a.theme.panel.find("#wordcount").text(["Words: {0}",e.getCount()])}var c,d,e=this;c=a.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),d=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0];c&&tinymce.util.Delay.setEditorTimeout(a,function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e.getCount()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo",b),a.on("keyup",function(a){32==a.keyCode&&b()})},0)}),e.getCount=function(){var b=a.getContent({format:"raw"}),e=0;if(b){b=b.replace(/\.\.\./g," "),b=b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}});

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
wbase-0.3.20 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.19 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.18 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.17 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.16 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.15 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.14 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.13 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.12 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.11 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.10 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.9 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.8 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.7 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.6 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.5 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.4 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.3 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.2 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js
wbase-0.3.1 lib/vendor/admin/tinymce/plugins/wordcount/plugin.min.js