# Add query replace in the editor

**URL:** https://meta.discourse.org/t/add-query-replace-in-the-editor/304596
**Category:** Feature
**Tags:** composer
**Created:** [April 19, 2024, 9:47am UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596 "2024-04-19T09:47:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jidanni](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidanni/32/291938_2.png) [@jidanni](https://meta.discourse.org/u/jidanni)
#### Post date: [April 19, 2024, 9:47am UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/1 "2024-04-19T09:47:58Z")

</div>

Let’s say you have a lot of "33"s that you want to change into "44"s.

Well on GitHub when we’re editing source code they’ve got a nice query replace function right there in the web based editor.

So there’s “no reason” why Discourse couldn’t have the same! (Worldwide.)

That way we wouldn’t need to copy our text into some other editor, do the replacements, and then paste it back in.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 19, 2024, 10:47am UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/2 "2024-04-19T10:47:16Z")

</div>

Yes please!

With Discourse long-form writing this has become more and more an issue for me.

It’s currently necessary to move it out to a third party editor (manually), make the changes and then put them back. Ugh!

Excellent #Contribute > Feature request!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 20, 2024, 1:45am UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/3 "2024-04-20T01:45:34Z")

</div>

That sounds super useful. Putting here what does Github for visual reference (ctrl + f):

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/4/d/94de5e2f3370ef1e898b24fbc91c224adeefc126.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 22, 2024, 5:08pm UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/5 "2024-04-22T17:08:33Z")

</div>

![Image](https://global.discourse-cdn.com/meta/original/4X/1/1/4/114c543a6f9ed96de171b8dd643d5ace1c99a9b0.jpeg)

OK this works. using prompt `replace all "words" with "things"` in the AI popup shown in the screenshot above when you select the text:

before:

> Here is a big block of text with lots of repeating words. All the words are words that are words and more words. A group of donkeys are always words, but a group of words are not always donkeys.

after:

> Here is a big block of text with lots of repeating things. All the things are things that are things and more things. A group of donkeys are always things, but a group of things are not always donkeys.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 22, 2024, 5:14pm UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/6 "2024-04-22T17:14:51Z")

</div>

It would be helpful and interesting to have the ability to choose prompts from a list. 🤔 (even creating your own)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 23, 2024, 3:08pm UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/7 "2024-04-23T15:08:03Z")

</div>

Something to consider on the new composer experiment @renato

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 26, 2024, 7:29am UTC](https://meta.discourse.org/t/add-query-replace-in-the-editor/304596/8 "2024-04-26T07:29:36Z")

</div>

“replace all animals with similar amphibian animals”

> Here is a big block of text with lots of repeating words. All the words are words that are words and more words. A group of salamanders are always words, but a group of words are not always salamanders.

🙂 LLMs sure can be useful.
