After using SceneBuilder 2 to create a Dialog for displaying Help documents in a WebView, I proceeded to generate an HTML document in Libre Office Writer.
Upon loading the 'Help.html' file, I noticed that the line spacing in the WebView differed from what was displayed in Libre Office.
My goal is to replicate the visual style of the HTML document as seen in Libre within the WebView.
I suspect that there may be a Style attribute that needs adjustment. The text within paragraphs wraps correctly, but it's the excessive spacing after CR/LF that poses a challenge.
The initialize method of the Controller:
public void initialize(URL url, ResourceBundle rb)
{
WebEngine webEngine = webView.getEngine();
// Load HTML Content
webEngine.load(getClass().getResource("/SampleHelp.html").toExternalForm());
}
Contents of SampleHelp.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
... (content omitted for brevity)
</html>
Comparison between SampleHelp.html in the WebView and in Mozilla Firefox:
In Libre Office Writer: Despite accurately displaying the content in the WebView, the issue arises with spacing between paragraphs post CR/LF.
For instance, the section "Load File - Saleyard" should have continuous lines without space breaks in between them. Similarly, each subsequent heading and paragraph grouping should follow suit.