rfresh Well-Known Member Licensed User Longtime User Apr 6, 2012 #1 I want to put some HTML text I created in my html editor into my webview via Code: Copy WebView1.LoadHtml("<html><body>Hello world!</body></html>") But my HTML text spans multiple lines so it breaks the compiler. I searched for multiple lines and saw the _ char and added those to the end of each line but that didn't work. I guess those are not for HTML text. I'd hate to have to run the text together on one line. Is there anyway to get multiple lines in HTML to work with the LoadHtml method? Thanks...
I want to put some HTML text I created in my html editor into my webview via Code: Copy WebView1.LoadHtml("<html><body>Hello world!</body></html>") But my HTML text spans multiple lines so it breaks the compiler. I searched for multiple lines and saw the _ char and added those to the end of each line but that didn't work. I guess those are not for HTML text. I'd hate to have to run the text together on one line. Is there anyway to get multiple lines in HTML to work with the LoadHtml method? Thanks...
NJDude Expert Licensed User Longtime User Apr 6, 2012 #2 You could save an HTML in Dir.Assets and do something like this: Code: Copy HTML = File.GetText(File.DirAssets, "MyHTML.html") WebView1.LoadHtml(HTML) Upvote 0
You could save an HTML in Dir.Assets and do something like this: Code: Copy HTML = File.GetText(File.DirAssets, "MyHTML.html") WebView1.LoadHtml(HTML)
A admac231 Active Member Licensed User Longtime User Apr 6, 2012 #3 Like this: Code: Copy WebView1.LoadHtml("<html><body>Hello world!"& _ "<br/>Second line"& _ "<br/>Third line</body></html>") Or you could just save the HTML file into the assets folder and load it into the webview. Upvote 0
Like this: Code: Copy WebView1.LoadHtml("<html><body>Hello world!"& _ "<br/>Second line"& _ "<br/>Third line</body></html>") Or you could just save the HTML file into the assets folder and load it into the webview.
rfresh Well-Known Member Licensed User Longtime User Apr 6, 2012 #4 Thank you. You guys really rock!! Upvote 0