{"id":36346,"date":"2022-06-24T16:21:28","date_gmt":"2022-06-24T20:21:28","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=36346"},"modified":"2022-06-24T16:23:57","modified_gmt":"2022-06-24T20:23:57","slug":"customize-the-contextual-menu-of-a-mac-wkwebview","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/06\/24\/customize-the-contextual-menu-of-a-mac-wkwebview\/","title":{"rendered":"Customize the Contextual Menu of a Mac WKWebView"},"content":{"rendered":"<p><a href=\"https:\/\/icab.de\/blog\/2022\/06\/12\/customize-the-contextual-menu-of-wkwebview-on-macos\/\">Alexander Clauss<\/a>:<\/p>\n<blockquote cite=\"https:\/\/icab.de\/blog\/2022\/06\/12\/customize-the-contextual-menu-of-wkwebview-on-macos\/\">\n<p>Under iOS the <code>WKWebView<\/code> class provides a delegate method which allow to customize the contextual menu of the web engine (the menu which opens when long-pressing a link). Unfortunately under macOS the <code>WKWebView<\/code> does not provide such a method for its contextual menu. This article explains how you can customize the contextual menu of <code>WKWebView<\/code> under macOS as well. It&rsquo;s not that obvious how to do this, but it can be done.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Alexander Clauss: Under iOS the WKWebView class provides a delegate method which allow to customize the contextual menu of the web engine (the menu which opens when long-pressing a link). Unfortunately under macOS the WKWebView does not provide such a method for its contextual menu. This article explains how you can customize the contextual menu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-06-24T20:21:30Z","apple_news_api_id":"5b0ee14d-0fd2-4b7d-942d-dd6edaf5342b","apple_news_api_modified_at":"2022-06-24T20:24:00Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AWw7hTQ_SS32ULd1u2vU0Kw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,30,2077,71,1926],"class_list":["post-36346","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-mac","tag-macos-12","tag-programming","tag-wkwebview"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=36346"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36346\/revisions"}],"predecessor-version":[{"id":36347,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36346\/revisions\/36347"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=36346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=36346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=36346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}