Skip to content

WebODF libs integration with WKWebView to open document files. #945

@VishalKumar2016

Description

@VishalKumar2016

WebODF libs integration with UIWebView: Integrated WebODF libs with UIWebView and it's working fine. Please find the below steps

  1. Load index.html file from WebODF libs on UIWebView
  2. Inject .odt file On webViewDidFinishLoad using below code snippet
_let jsFunction = "createEditor(\"../default.odt\", \"Test\", 375, 667)"
webView.stringByEvaluatingJavaScript(from: jsFunction)_
  1. Successfully load the odt file.

WebODF libs integration with WKWebView: Integrated WebODF libs with WKWebView but it's not working.

  1. Load index.html file from WebODF libs on WKWebView
  2. Inject .odt file On didFinish navigation using below code snippet
let jsFunction = "createEditor(\"../default.odt\", \"Test\", 375, 667)"
webView.evaluateJavaScript(jsFunction) { (result, error)
  1. Not able to load the file, only showing blank white screen. Even evaluateJavaScript function return true value.

Please let me know if anyone can find the solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions