RichEditor icon indicating copy to clipboard operation
RichEditor copied to clipboard

输入时滚动到光标位置有解决方案吗

Open c4jeff opened this issue 5 years ago • 2 comments

RT

c4jeff avatar Oct 12 '19 03:10 c4jeff

https://github.com/RexSuper/RichEditor/wiki/RichEditor-Wiki(%E5%9D%91%E9%80%BC%E8%AE%B0%E5%BD%95)

“4.如何在插入后,让光标在屏幕范围内?”

暂时客户端还没有完美解决方案。

本逻辑采用的内嵌html contenteditable="true"的方式实现,也就是用web端方式实现,方法逻辑在 rich_editor.js中

本文在插入图片后有实现一定的滚动如下“ RE.editor.scrollIntoView(false)” 但是效果并不完全

RE.insertImage = function(url, alt,style) { var html = '' + alt + '
'; RE.insertHTML(html); RE.editor.scrollIntoView(false) }

只能通过搜索contenteditable="true"如何滚到光标的方式搜索,或者请求前端朋友,目前在改进中

RexSuper avatar Oct 31 '19 01:10 RexSuper

我也遇到了这个问题,