richeditor-android
richeditor-android copied to clipboard
当打开过webview后,再进入编辑器,richeditor不生效
我第一个页面是webview加载的h5内容,点击h5页面里的编辑按钮,跳转到richeditor编辑器里并把内容传递了过来,这时候编辑器里不展示任何内容,而且下方的加粗、倾斜等按钮也不生效。请问这种情况如何解决?
newProgress
onPageFinished
onPageFinished
大佬什么意思?是重写这个方法然后在里面设置进度条吗?
我刚才遇到这个问题,发现他不会走onPageFinished方法,你自己重写newProgress方法,监听下如果newProgress到达80以上 就执行onPageFinished方法里面的内容,前提你要把作者的代码扣下来放在自己的项目中
嗯,随后有空了试试吧,目前已经换方案了
------------------ 原始邮件 ------------------ 发件人: zipper <[email protected]> 发送时间: 2019年11月21日 15:44 收件人: wasabeef/richeditor-android <[email protected]> 抄送: Kevin <[email protected]>, Author <[email protected]> 主题: 回复:[wasabeef/richeditor-android] 当打开过webview后,再进入编辑器,richeditor不生效 (#210)
我刚才遇到这个问题,发现他不会走onPageFinished方法,你自己重写newProgress方法,监听下如果newProgress到达80以上 就执行onPageFinished方法里面的内容,前提你要把作者的代码扣下来放在自己的项目中
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
如果你第一个webView加载的页面里有video标签, 而且其没有设置preload或者poster属性,就会导致onPageFinished调用不到,这是安卓的一个bug ,如果加载的页面是你自己写的,可以在HTML中添加preload=none
页面加载完成,在执行插入文本 @Override public void onPageFinished(WebView view, String url) { isReady = url.equalsIgnoreCase(SETUP_HTML); //页面加载完成 }
if (isReady) { load(trigger); } else { postDelayed(new Runnable() { @Override public void run() { exec(trigger); } }, 100); }