fleather
fleather copied to clipboard
Search feature
Need below search functionality.
- Basic search
- Filtering based on case (Upper and Lower Case)
- Filter to match exact word.
Thank you for this issue. Interested to understand the use case you have in mind @vinitk-aveosoft You have used fleather in a context where a large text is used? How long a text?
I'm not sure what that means @amantoux . What I have in mind is some thing like below attached images. I have been using flutter_quill, but the package is very buggy.
Interesting feature! @vinitk-aveosoft Feel free to contribute!
Hello, Only adding my two cents. From my experience, this seemingly simple feature is in fact very complex and the use cases can differ between applications. And don't forget the tests around such feature !
Prerequisites:
- non-invasive highlighting (not changing the actual text). I think relative work was pushed beginning of January for the spellchecker. Highlighting would mean decorating with font color, red (depending on style) squiggles or underline (IOS or Mac), colored highlight,...
- Programmatic way to jump from position to position, with selection and replacement.
- Highlighting and cursor movement/selections externally available.
Use cases & features:
- Handle Case sensitive/insensitive
- Handle regular expressions
- Handle "whole word" (careful of what is considered a word in non-latin languages ?)
- Replace all
- Replace next
- Move previous / next find
- number of occurrences, index of selected occurrence
- UI design: Do you want a Word-like search, a VS Code-like search, a Qt-Creator-like search, a non-modal windowed search ? Imposing the search&replace UI have its pros & cons. Our view may not contend to all use cases.
My thoughts: Personally, I think that such feature could be another package, with a way to plug it in Fleather. This would be the same way a third-party spellchecker (like Antidote or LanguageTool) can be plugged in. I read somewhere that work was done toward offering this extensibility. Spellchecker API and Search/Replace can share the same API, couldn't they ?