Notepad icon indicating copy to clipboard operation
Notepad copied to clipboard

feat: find word

Open Muhammed-Rahif opened this issue 3 years ago • 3 comments

There is already a button for find in Edit -> Find ( ctrl + f ) in text editor mode, but its not working. Words that matches the find string from user should highlight on textarea.

Solution I prefer :-

Use the npm module called highlight-within-textarea. To use this module we also need to install jquery. After installing both packages you need to done these task :-

  • [ ] Popup a small input field when user clicks on Edit -> Find ( or the shortcut ctrl + f ). Highlight the words from small input field. And should update the highlight words in textarea when the small input (find input) changes.
  • [ ] Replace vanilla js using jquery.
- document.getElementById("some-id") // code like this
+ $("#some-id") // replace by using jquery

Helpful resources :-

  • https://www.npmjs.com/package/jquery
  • https://www.npmjs.com/package/highlight-within-textarea
  • https://github.com/lonekorean/highlight-within-textarea
  • http://lonekorean.github.io/highlight-within-textarea
  • https://stackoverflow.com/questions/32389568/search-for-a-string-from-a-textbox-in-a-textarea
  • https://stackoverflow.com/questions/63793518/how-to-select-a-word-or-a-phrase-in-a-text-area-in-javascript

Muhammed-Rahif avatar Jan 12 '22 13:01 Muhammed-Rahif

I would love to help with this

Emeka-Ugbanu-hub avatar Jan 29 '22 23:01 Emeka-Ugbanu-hub

@Emeka-Ugbanu-hub any help? or do I need to take this?

Muhammed-Rahif avatar Jan 30 '22 13:01 Muhammed-Rahif

I just made a pull request and have implemented the feature

Emeka-Ugbanu-hub avatar Jan 31 '22 10:01 Emeka-Ugbanu-hub

Hi @Emeka-Ugbanu-hub,

I'm writing to let you know that due to unforeseen circumstances, this project has been inactive for the past few months. We apologize for any inconvenience this may have caused.

We've recently switched the technology stack of this project from ReactJS to NextJS. As a result, the issues related to the old stack are no longer applicable.

We've deployed the new version of the app to production, and you can access it at this link: https://notepad-dusky.vercel.app/

I would like to take this opportunity to encourage you to actively contribute to the project. If you have any ideas, feature requests, or bug reports, please don't hesitate to create a new issue or submit a pull request on our GitHub repository.

Therefore, I'm closing this issue. If you believe that the issue is still relevant to the current version of the project, please feel free to create a new issue and provide details on how to reproduce the problem.

Thank you, @Emeka-Ugbanu-hub, for your understanding and for your interest in this project! Let's work together to bring it back to life.

Best regards,
Muhammed Rahif

Muhammed-Rahif avatar Feb 23 '23 17:02 Muhammed-Rahif