fix doc nav scroll

This commit is contained in:
lealife
2021-03-26 16:07:26 +08:00
parent d49f837b2e
commit 14643d3cf4
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ tinymce.PluginManager.add('leanote_nav', function(editor) {
var text = $(hs[i]).text();
var tagName = hs[i].tagName.toLowerCase();
// scrollTo在page.js中定义
titles += '<li class="nav-' + tagName + '"><a data-a="' + tagName + '-' + encodeURI(text)+'" onclick="scrollTo(this, \'' + tagName + '\', \'' + text + '\')">' + text + '</a></li>';
titles += '<li class="nav-' + tagName + '"><a data-a="' + tagName + '-' + encodeURI(text)+'" onclick="window.scrollTo(this, \'' + tagName + '\', \'' + text + '\')">' + text + '</a></li>';
}
titles += "</ul>";
$("#leanoteNavContent").html(titles).height("auto"); // auto