Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/MuhammedAlkhudiry/quill-find-replace-module

A module for Quill rich text editor to allow searching/finding words and replacing them.
https://github.com/MuhammedAlkhudiry/quill-find-replace-module

Last synced: 3 months ago
JSON representation

A module for Quill rich text editor to allow searching/finding words and replacing them.

Awesome Lists containing this project

README

        

# Quill Find/Replace Module
A module for Quill rich text editor to allow searching/finding words and replacing them.

## Demo

[Demo](https://codepen.io/muhammedalkhudiry/pen/VoMxeK)

## Usage

Download Searcher.js, SearchBlot.js files, then:

JS
```
// import module files
import Searcher from "path/to/Searcher.js";
import SearchedStringBlot from "path/to/SearchBlot.js";

// register them
Quill.register('modules/Searcher', Searcher);
Quill.register(SearchedStringBlot);

// initialize Quill editor
const quill = new Quill('#editor', {
modules: {
Searcher: true,
},
});
```

CSS
* You could choose how the searched word will look, but don't change: display: inline;
```
.ql-searched-string {
background-color: #f8ff00;
display: inline;

}

```

## UI

There should be an input and button for every needed functionality:
* Three button for search, replace, replace-all
with IDs: "search", "replace", "replace-all"
* Two input with IDs: "search-input", "replace-input"

#### Example:

```

find
replace
replace all
```

# future plans
* add options
* the module now only support text-only editor, if your editor will include images, then the searcher with not work properly,
see [here](https://github.com/quilljs/quill/issues/2698)
# Contribution
Please, make an [issue](https://github.com/MuhammedAlkhudiry/quill-find-replace-module/issues).

# License
[MIT License](https://rmm5t.mit-license.org/)