summaryrefslogtreecommitdiff
path: root/program/js/tinymce/plugins/visualchars/plugin.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tinymce/plugins/visualchars/plugin.min.js')
-rw-r--r--program/js/tinymce/plugins/visualchars/plugin.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/tinymce/plugins/visualchars/plugin.min.js b/program/js/tinymce/plugins/visualchars/plugin.min.js
index fc7e109b7..a1d2a7b3d 100644
--- a/program/js/tinymce/plugins/visualchars/plugin.min.js
+++ b/program/js/tinymce/plugins/visualchars/plugin.min.js
@@ -1 +1 @@
-tinymce.PluginManager.add("visualchars",function(e){function a(a){var t,s,i,r,c,d,l=e.getBody(),m=e.selection;if(n=!n,o.state=n,e.fire("VisualChars",{state:n}),a&&(d=m.getBookmark()),n)for(s=[],tinymce.walk(l,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&s.push(e)},"childNodes"),i=0;i<s.length;i++){for(r=s[i].nodeValue,r=r.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mce-nbsp">$1</span>'),c=e.dom.create("div",null,r);t=c.lastChild;)e.dom.insertAfter(t,s[i]);e.dom.remove(s[i])}else for(s=e.dom.select("span.mce-nbsp",l),i=s.length-1;i>=0;i--)e.dom.remove(s[i],1);m.moveToBookmark(d)}function t(){var a=this;e.on("VisualChars",function(e){a.active(e.state)})}var n,o=this;e.addCommand("mceVisualChars",a),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t,selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,a(!1))})}); \ No newline at end of file
+tinymce.PluginManager.add("visualchars",function(a){function b(b){var c,f,g,h,i,j,k=a.getBody(),l=a.selection;if(d=!d,e.state=d,a.fire("VisualChars",{state:d}),b&&(j=l.getBookmark()),d)for(f=[],tinymce.walk(k,function(a){3==a.nodeType&&a.nodeValue&&-1!=a.nodeValue.indexOf("\xa0")&&f.push(a)},"childNodes"),g=0;g<f.length;g++){for(h=f[g].nodeValue,h=h.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mce-nbsp">$1</span>'),i=a.dom.create("div",null,h);c=i.lastChild;)a.dom.insertAfter(c,f[g]);a.dom.remove(f[g])}else for(f=a.dom.select("span.mce-nbsp",k),g=f.length-1;g>=0;g--)a.dom.remove(f[g],1);l.moveToBookmark(j)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("beforegetcontent",function(a){d&&"raw"!=a.format&&!a.draft&&(d=!0,b(!1))})}); \ No newline at end of file