Bỏ qua đến nội dung

Add Window In-Field Search (Ctrl+F) with Highlighting & Minimap

Chờ xử lý #anki #addon #add #window #field #search #ctrlf
https://github.com/Nightwindx/Add-Window-In-Field-Search-Ctrl-F-
28/11/2025

Cách tải addon Add Window In-Field Search (Ctrl+F) with Highlighting & Minimap

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

405888752

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 405888752 và copy

Mô tả chi tiết

This add-on adds a true Ctrl+F search bar to Anki’s Add Cards window, with full-text highlighting inside the editor — similar to modern web browsers.

It is ideal for users who create long, complex notes and want the ability to quickly locate text inside the editor while writing cards.

🔍 Features ✅ Ctrl+F to open a Find bar (like a browser)

Press Ctrl+F in the Add window to reveal a small search bar placed neatly beside the bottom action buttons.

Automatically focuses the input Automatically selects text in the field Press Enter to search Press Esc or click ✕ to close the bar 🎨 Inline highlighting (all matches)

Search results inside the note editor are highlighted using the browser-style API CSS.highlights.

📍 Match minimap on the right side

A tiny scrollbar “minimap” indicates all match positions within the note at a glance.

🧠 First-match focus

After searching, the editor scrolls directly to the first result.

🛠 Top highlighter panel is shown only when searching

The original highlighter panel (“0 Matches | Scroll: On | ⚙”) appears only when the Find bar is active, and hides itself automatically when the bar is closed.

💡 Clean UI No Prev/Next buttons (Enter re-runs search) No extra space added when inactive Integrates seamlessly with Anki’s dark theme 🧩 Compatibility ✔ Fully supported on: Anki 23.10 and newer Anki 24.x Anki 25.x

These versions use Qt6 WebEngine (Chromium ≥112) and support the Web Highlight API needed for modern text-highlighting.

⚠ Partial support:

Anki 2.1.55 – 2.1.54 (Qt5 WebEngine)

The search bar works Highlighting/minimap do NOT work (Chromium too old) ❌ Not supported:

Anki 2.1.49 and older

No modern WebEngine No CSS Highlights No dynamic editor injection Cannot function 🙏 Credits

This add-on incorporates key components from the outstanding:

Browser Search Result Highlighter

by hssm (AnkiWeb: 1057317630)

Specifically, the following files or portions of files from hssm’s work are used here or adapted:

editor.js editor.css presets.js parser.py

These provide the core highlighter engine, match minimap, and text parsing logic. Full credit goes to hssm for developing the original highlighter.

All modifications in this add-on apply that engine to the Add window editor, add UI toggling, integrate with Ctrl+F, and add behavior specific to the Add Cards workflow.

📝 Source Code

Available inside the add-on folder under:

addons21/add_window_find_bar/

Includes:

init.py (Python integration layer) JS/CSS assets for the editor Highlighter bridge code


Liên kết hỗ trợ