I want to delete some suggestedActions and add custom menu when select text in webView in iOS 16. How can I do it with UIEditMenuInteraction? Before I use canPerformAction + UIMenuController
Custom webView menu
I achieved the results I wanted for the time being through swizzle method 'UIEditMenuInteraction.initWithDelegate:'. Block the delegate method 'menuForConfiguration~suggestedActions' to invocation. It is not good. Hope wkwebview provide some official methods to custom menu sooner
Can you tell us how you did it? I have the same problem as you. Thank you
refer to "EditMenuInteractionSwizzler" in https://github.com/WebKit/WebKit/commit/6ccebd62d5e006e524bb2011e6f21f963ca556dd#diff-3f267080617325c9746206b2aed1e1fbd1589e31e24d6281c8a7c0163315af40L1111
Hi, thank you for the swizzle solution! But for me "Block the delegate method 'menuForConfiguration~suggestedActions' to invocation." didn't work. It seems that WKWebView and UIWebView didn't call this delegate method. Can you show us some source code of how to achieve that? thanks a lot!