aboutsummaryrefslogtreecommitdiff
path: root/data/stuff/tinymce-4.3.7/plugins/noneditable
diff options
context:
space:
mode:
Diffstat (limited to 'data/stuff/tinymce-4.3.7/plugins/noneditable')
-rw-r--r--data/stuff/tinymce-4.3.7/plugins/noneditable/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/data/stuff/tinymce-4.3.7/plugins/noneditable/plugin.min.js b/data/stuff/tinymce-4.3.7/plugins/noneditable/plugin.min.js
new file mode 100644
index 0000000..49e9d5a
--- /dev/null
+++ b/data/stuff/tinymce-4.3.7/plugins/noneditable/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("noneditable",function(a){function b(a){return function(b){return-1!==(" "+b.attr("class")+" ").indexOf(a)}}function c(b){function c(b){var c=arguments,d=c[c.length-2];return d>0&&'"'==g.charAt(d-1)?b:'<span class="'+h+'" data-mce-content="'+a.dom.encode(c[0])+'">'+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+"</span>"}var d=f.length,g=b.content,h=tinymce.trim(e);if("raw"!=b.format){for(;d--;)g=g.replace(f[d],c);b.content=g}}var d,e,f,g="contenteditable";d=" "+tinymce.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",e=" "+tinymce.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var h=b(d),i=b(e);f=a.getParam("noneditable_regexp"),f&&!f.length&&(f=[f]),a.on("PreInit",function(){f&&a.on("BeforeSetContent",c),a.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],h(b)?b.attr(g,"true"):i(b)&&b.attr(g,"false")}),a.serializer.addAttributeFilter(g,function(a){for(var b,c=a.length;c--;)b=a[c],(h(b)||i(b))&&(f&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(g,null))})})}); \ No newline at end of file