How to load html string in a webview?
To load your data in WebView. Call loadData() method of WebView
wv.loadData(yourData, "text/html", "UTF-8");
You can check this example
http://developer.android.com/reference/android/webkit/WebView.html
[Edit 1]
You should add -- \ -- before -- " -- for example --> name=\"spanish press\"
below string worked for me
String webData = "<!DOCTYPE html><head> <meta http-equiv=\"Content-Type\" " +
"content=\"text/html; charset=utf-8\"> <html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1250\">"+
"<meta name=\"spanish press\" content=\"spain, spanish newspaper, news,economy,politics,sports\"><title></title></head><body id=\"body\">"+
"<script src=\"http://www.myscript.com/a\"></script>şlkasşldkasşdksaşdkaşskdşk</body></html>";
unable to load html into webview from html string
Solved, I used
webView.loadDataWithBaseURL(null, content, "text/html", "UTF-8", null);
How to load a HTML in String to WebView in Flutter
use this package flutter_html: ^1.0.0
import 'package:flutter_html/flutter_html.dart';
SingleChildScrollView(
child: Html(
data: "<div></div>", // Your Html code over here
padding: EdgeInsets.all(8.0),
));
Related Topics
Updated Sdk Version, Getting Classnotfoundexception: Android.Support.V4.View.Viewpager
Soft Keyboard Shows Up on Edittext Focus Only Once
Android: Changing Nfc Settings (On/Off) Programmatically
Cardview Inside Recyclerview Has Extra Margins
How to Set Up Multiple Listeners for One Event
Android Volley Sending Data Twice
Android:How to Change Playback Rate of Music Using Opensl Es
How to Show/Hide Password in Textformfield
Findviewbyid Returns Null When Using Fragment
How to Add a Hint in Spinner in Xml
Communication Between Broadcastreceiver and Activity - Android
Newer Versions of Android Studio and Only Two Drawable Directory - Drawable and Drawable-V21
Camera in Android, How to Get Best Size, Preview Size, Picture Size, View Size, Image Distorted
No Notification Sound When Sending Notification from Firebase in Android
Pop the Fragment Backstack Without Playing the Pop-Animation
How to Use Edittext Ontextchanged Event When I Press the Number