Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
c4jeff opened this issue Oct 12, 2019 · 2 comments
Open

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

c4jeff opened this issue Oct 12, 2019 · 2 comments

Comments

@c4jeff
Copy link

c4jeff commented Oct 12, 2019

RT

@RexSuper
Copy link
Owner

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"如何滚到光标的方式搜索,或者请求前端朋友,目前在改进中

@LongLongLongLongLongLongLongLongLong

我也遇到了这个问题,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants