Kindeditor使用newlineTag: 'br'后按回车就回滚顶部
时间: 2017-02-11来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>>
不使用newlineTag: 'br' 的话各种<P>标签不堪入目 .
网上有人给出方案:
版本 4.1.10 kindeditor.js 第 1514 行这个函数 box.top 是负数了, 然而这个函数返回后, 第 2763 行执行了 win.scrollTo(pos.x, pos.y); 滚动滚动条. pos : function() { var self = this, node = self[0], x = 0, y = 0; if (node) { if (node.getBoundingClientRect) { var box = node.getBoundingClientRect(), pos = _getScrollPos(self.doc); x = box.left + pos.x; //y = box.top + pos.y; //临时解决方案 针对 newlineTag: 'br', y = pos.y; } else { while (node) { x += node.offsetLeft; y += node.offsetTop; node = node.offsetParent; } } } return {x : _round(x), y : _round(y)}; },
但是我测试没用啊 .
要不各位再推荐一个小清新的在线编辑器 .

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行