Add query replace in the editor

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.

6 Likes

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 feature request!

5 Likes

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

5 Likes

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.

4 Likes

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

2 Likes

Something to consider on the new composer experiment @renato

6 Likes

“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.

:slight_smile: LLMs sure can be useful.

5 Likes