How find-in-page-plugin should works nicely with CodeMirror Search and Replace?

Hi Devs,

Tiddlywiki have plugin called CodeMirror Search and Replace which is very nice and use-full plugin when working inside CodeMirror (e.g. Tiddler’s Edit mode)!

As I prefer workgin with TiddlyDesktop over Chrome, so I am using plugin called find-in-page-plugin / highlight-searched-text!

Now find-in-page-plugins works well e.g. Ctrl + F to seach and Ctrl + G / Shift + Ctrl + G to find next / previous.

As find-in-page-plugins not works inside tiddler’s edit mode… So How can is tell the find-in-page-plugins that when in Tiddler edit mode / when focus is in code-editor’s window then it’s must not works other-wise it’s must works.

Note: Basically both plugins have same standerd short-cut which are conflicting…

How to solve the problem please!

I have working project under this:

https://ctoabidmaqbool1.github.io/tiddlywiki-find-in-page-plugin/

Thans in advanced!

You can define / change your shortcuts here:
grafik

1 Like

Thanks for providing the suggestion, Yeah there is an option to change confilicting short-cuts through Keyboard Shortcuts tab.

But I prefer stander standers short-cuts e.g. Ctrl + F, Ctrl + G, Ctrl + Shift + G for both within CodeMirror and outside of CodeMirror.

I am more like finding out custom codding / tiddlywiki development to solve the problem!

Hi, I’m really interested in your plugin, Everything seems to work on my end but im getting constant Javascript errorsthat say:

Uncaught TypeError: Cannot read properties of null (reading ‘removeChild’)

Do you have any idea why this might be happening?

I hope i’m not bumping this after too long, but it seems like this is the only implementation of its kind for now, and its really vital functionality, i was surprised this wasn’t included in TiddlyDesktop.

The page-search feature that is being discussed here, is provided by the host environment, typically a browser.

When you are using TiddlyDesktop, you are not using a browser, so tools like search, and a Back Button are not available since you don’t have a browser.

In fact, TiddlyWiki itself has never provided page-search, or indeed, a back button.

Put simply, if you want facilities offered by a browser, use a browser.

1 Like

As Chat GPT says about the back button

Limitations:

  • Websites cannot directly manipulate the browser’s native back or forward buttons but can only influence the history stack, which indirectly affects their behavior.
  • Modern browsers may implement safeguards to prevent abuse of the History API.

and the Find in page

No, a website cannot directly trigger the browser’s “Find in Page” feature (typically activated with Ctrl+F or Command+F). This is a browser-level function designed for the user’s convenience, and it operates independently of the website’s code or content.

However you can build the equivalent of these within TiddlyWiki that works only in that wiki.