问题
We have an embedded HTML form type editor in a macOS app that needs to be filled by the user. We are using WKWebView with Swift and it's all working fine but we are not able to get the spell check working in WKWebView. I mean it does work and corrects some words but doesn't show red dotted underline on misspelled words like WebView.
WebView shows dotted redline where WKWebView does not. Found that WebView has property as isContinuousSpellCheckingEnabled
but no such property is available in WKWebView.
My simple requirement to highlight misspelled words, please help if there's anything available.
回答1:
I did not found it yet: so far no such property is available in WKWebView.
From apple
Description Daniel Bates 2018-08-21 11:23:20 PDT
We should render misspelled words with the spelling correction dots in iOS WebKit (i.e. when using WKWebView). Currently we only support this in iOS WebKit Legacy (i.e. when using UIWebView).
来源:https://stackoverflow.com/questions/57532801/swift-wkwebview-continuous-spell-checking