芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/www/panel/vendors/tinymce/plugins/toc/plugin.min.js
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i
',e=""+b+">";return d+a.dom.encode(c)+e}function l(a){var b=m(a);return'
'+b+"
"}function m(a){var c,d,e,f,g="",h=i(a),l=j(h)-1;if(!h.length)return"";for(g+=k(a.headerTag,b.translate("Table of Contents")),c=0;c
";else for(d=l;d
";if(g+='
'+e.title+"
",f!==e.level&&f)for(d=e.level;d>f;d--)g+="
";else g+="
",f||(g+="");l=e.level}return g}var n,o=a.$,p={depth:3,headerTag:"h2",className:"mce-toc"},q=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}},r=q("mcetoc_");a.on("PreInit",function(){var b=a.settings,c=parseInt(b.toc_depth,10)||0;n={depth:c>=1&&c<=9?c:p.depth,headerTag:d(b.toc_header)?b.toc_header:p.headerTag,className:b.toc_class?a.dom.encode(b.toc_class):p.className}}),a.on("PreProcess",function(a){var b=o("."+n.className,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),a.on("SetContent",function(){var a=o("."+n.className);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))});var s=function(b){return!b.length||a.dom.getParents(b[0],".mce-offscreen-selection").length>0};a.addCommand("mceInsertToc",function(){var b=o("."+n.className);s(b)?a.insertContent(l(n)):a.execCommand("mceUpdateToc")}),a.addCommand("mceUpdateToc",function(){var b=o("."+n.className);b.length&&a.undoManager.transact(function(){b.html(m(n))})}),a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:f}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addContextToolbar(e,"tocupdate"),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:f})}),function(){}}),d("0")()}();