Render HTML

When rendering HTML into my view, I have the following part:

struct HTMLStringView: UIViewRepresentable {
  let htmlContent: String

  func makeUIView(context: Context) -> WKWebView {
    return WKWebView()
  }

  func updateUIView(_ uiView: WKWebView, context: Context) {
     
    let headerString = "<head><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'></head>"
    uiView.loadHTMLString(headerString + htmlContent, baseURL: nil)
  }
}

Everything works fine but some problems:
  1. If the html is long, It will create an another vertical scrollbar inside my view (so I will have 2 scrollbars)

  2. Font family and size still dont match the original view.

How can I fix it ?

Thx
Render HTML
 
 
Q