Class MarkdownWebView

java.lang.Object
io.github.raghultech.markdown.javafx.preview.MarkdownWebView

public class MarkdownWebView extends Object
A reusable Markdown preview component that renders into a WebView. You can: - Supply your own WebView or let it create one. - Render content from File or String. - Attach HostServices to open external links.
  • Constructor Details

    • MarkdownWebView

      public MarkdownWebView(File file, javafx.application.HostServices hostServices)
      Constructor with File input and new WebView.
    • MarkdownWebView

      public MarkdownWebView(String content, javafx.application.HostServices hostServices)
      Constructor with String input and new WebView.
    • MarkdownWebView

      public MarkdownWebView(javafx.scene.web.WebView webView, File file, javafx.application.HostServices hostServices)
      Constructor with supplied WebView and File.
    • MarkdownWebView

      public MarkdownWebView(javafx.scene.web.WebView webView, String content, javafx.application.HostServices hostServices)
      Constructor with supplied WebView and String.
  • Method Details

    • launch

      public javafx.scene.web.WebView launch()
      Launches the preview.
    • updatefullContent

      public void updatefullContent()
    • dispose

      public void dispose()
      Disposes resources and stops the preview.
    • getWebView

      public javafx.scene.web.WebView getWebView()
      Returns the WebView to embed in your layout.
    • isDisposed

      public boolean isDisposed()
      Indicates whether the preview has been disposed.
    • isPreviewShowing

      public boolean isPreviewShowing()
    • setCurrentFile

      public void setCurrentFile(File file)
    • getCurrentFile

      public File getCurrentFile()
    • setContent

      public void setContent(String content)
    • getContent

      public String getContent()
    • setDarkMode

      public void setDarkMode(boolean isdark)
    • getisDarkMode

      public boolean getisDarkMode()