update messages

This commit is contained in:
life
2015-01-08 00:38:54 +08:00
parent 2cfc89ca5f
commit d24531dc78
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
tinymce.PluginManager.add("leanote_nav",function(t){function n(){var n=t.getBody(),o=$(n),a=o.html();if(e!=a){e=a;for(var i=o.find("h1,h2,h3,h4,h5,h6").toArray(),h="<ul>",l=0;l<i.length;++l){var c=$(i[l]).text(),r=i[l].tagName.toLowerCase();h+='<li class="nav-'+r+'"><a data-a="'+r+"-"+encodeURI(c)+'" onclick="scrollTo(this, \''+r+"', '"+c+"')\">"+c+"</a></li>"}h+="</ul>",$("#leanoteNavContent").html(h).height("auto"),i.length||$("#leanoteNavContent").html("&nbsp; Nothing...");var d=$("#leanoteNavContent").height(),g=$("#editorContent").height()-29;d>g&&$("#leanoteNavContent").height(g)}}var e="";t.on("init",function(){window.setTimeout(function(){n(),t.on("setcontent beforeadd undo paste",n),t.on("ExecCommand",function(){n()}),t.on("click",function(){n(),$("body").trigger("click")})},0)})});