webView(_:shouldChangeTypingStyle:toStyle:)
Returns whether the user should be allowed to change the typing style in a web view.
Declaration
optional func webView(_ webView: WebView!, shouldChangeTypingStyle currentStyle: DOMCSSStyleDeclaration!, toStyle proposedStyle: DOMCSSStyleDeclaration!) -> BoolParameters
- webView:
The web view that the user is editing.
- currentStyle:
The old style the user wants to change.
- proposedStyle:
The new style the user wants to set.
Return Value
true if the user should be allowed to change the typing style in webView to proposedStyle; otherwise, false.
Discussion
You can implement this method to take some other action—for example, set the typing style to a different style—and return false .