My application uses a WebView
to display dynamic HTML that is generated on-the-fly during use of the program.
I am trying to ensure the content of the HTML is all displayed within the WebView without horizontal scrolling at all (vertical is fine). I have found many guides on how to make the WebView scale with the contents, but not the other way around.
Here is the code used to generate the HTML:
html
.append("<head><style>\n")
.append(" body {\n")
.append(" font-size: ").append(Settings.getFontSize()).append("px;\n")
.append(" font-family: ").append(Settings.getFontName()).append(";\n")
.append(" }\n")
.append("</style></head><body>\n");
Then, within the body, I load some proprietary text that I cannot post here. The text will often extend past the right side of the WebView
:
* I apologize for the obfuscation; proprietary information
The WebView size cannot be increased to compensate. How do I set the style properly to allow for the text to wrap?
I have already tried setting the width
of body
to 100% and word-wrap
to "normal."
Thank you.
EDIT
My question has nothing to do with Bootstrap. If bootstrap is required for simply fitting the contents of a WebEngine
into the WebView
, it would be out of the question; are there any other work-arounds?
` in your `HTML` in the correct place`. Seems complicated to me though. – SedJ601 Jun 08 '18 at 19:58