Sha256: 4cf858bf37452bbcf5e05fafe4d49db3390221554c4c84642fcac5bacc75aaa1

Contents?: true

Size: 928 Bytes

Versions: 14

Compression:

Stored size: 928 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

14 entries across 14 versions & 3 rubygems

Version Path
jinda_bsb-0.0.1 lib/generators/jinda_bsb/templates/app/assets/jinda_assets/plugins/tinymce/plugins/wordcount/plugin.min.js
spiderfw-1.0.1 apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js
spiderfw-1.0.0 apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js
spiderfw-0.6.39 apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js
tinymce-rails-4.4.3 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.4.2 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.4.1 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.4.0 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.13 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.12 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.8 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.7 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.1 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js
tinymce-rails-4.3.0 vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js