---
title: "webView(_:shouldChangeTypingStyle:toStyle:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webeditingdelegate/webview(_:shouldchangetypingstyle:tostyle:)"
---

# webView(_:shouldChangeTypingStyle:toStyle:)

Returns whether the user should be allowed to change the typing style in a web view.

## Declaration

```swift
optional func webView(_ webView: WebView!, shouldChangeTypingStyle currentStyle: DOMCSSStyleDeclaration!, toStyle proposedStyle: DOMCSSStyleDeclaration!) -> Bool
```

## Parameters

- `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

Return Value true if the user should be allowed to change the typing style in webView to proposedStyle; otherwise, false.

## Discussion

Discussion You can implement this method to take some other action—for example, set the typing style to a different style—and return false .

## See Also

### Related Documentation

- [webViewDidChangeTypingStyle(_:)](webkit/webeditingdelegate/webviewdidchangetypingstyle(_:).md)
