Comments (3)
这些方法(包括insertHtml)需要在初始化完成了才能调用。建议自定义一个WebChromeClient,如下:
webView.setWebChromeClient(new CustomWebChromeClient());
private class CustomWebChromeClient extends WebChromeClient {
@Override public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
if (newProgress == 100) {
xxx.insertHtml(htmlStr);
}
}
@Override public void onReceivedTitle(WebView view, String title) {
super.onReceivedTitle(view, title);
}
}
from mricheditor.
谢谢,我试试
from mricheditor.
ok,完美解决,谢谢。 @Even201314
from mricheditor.
Related Issues (20)
- Can we change the font family from this library ?
- Bug: right alignement doesn't work well
- Bug: toggles aren't intuitive to use
- bug-选择的字体大小和webview回传的字体大小不一致 HOT 2
- Wysiwyg Viewer
- 如何取消引用
- summernote 修改字号的时候 如何ol的序号大小一起改变?
- 需求:给webview 加上输入提示呢,当获取焦点时,提示消失
- 如何取消一段H1标签状态
- 作者可以给我一个联系方式么?有问题请教,有报酬
- Regarding Implementation
- Error inflating class mEditor.ColorPaletteView HOT 1
- 适配问题。
- 致命问题 HOT 19
- 插入图片后如何换行
- 你好,有没有清空输入内容的方法
- 怎么取消字体加粗呀。我执行了bold加粗 再次执行bold 取消不了,求教
- KeyboardHeightProvider sometimes not work due to leakage of popupwidow.
- How to insert a section of html? Is able to insert video /audio?
- Security vulnerability CVE-2019-11358
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mricheditor.