Skip to content

Conversation

fcanas
Copy link
Contributor

@fcanas fcanas commented Jul 6, 2021

This enables text search in notebooks.

To accomplish this:

  • I converted the use of the deprecated WebView to the newer WKWebView.
  • The standard "Find" menu items were changed to send the preferred performTextFinderAction(_:) action.
  • ViewController was extended to serve as a NSTextFinderBarContainer and mediate between an NSTextFinder and the WKWebView.

Note that bugs in WebKit seem to prevent incremental search from working properly. I left incremental search disabled to avoid various fragile-seeming workarounds that are discussed around the web.

@tuxu
Copy link
Owner

tuxu commented Jul 16, 2021

Thanks a lot for the PR. Nice work! I hope to go over your changes on the weekend.

@tuxu
Copy link
Owner

tuxu commented Jul 19, 2021

Lgtm! I noticed that the actions to change text size (Cmd-+/-/0) were no longer working with WKWebView. I'll push a follow-up after merging this PR.

@tuxu tuxu merged commit 824937c into tuxu:master Jul 19, 2021
tuxu added a commit that referenced this pull request Jul 19, 2021
WKWebView, introduced in #28, no longer comes with actions to change the
zoom factor. Scale using the CSS 'zoom' property instead.
@tuxu tuxu mentioned this pull request Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants