Request: Put = marks around the selected text

I found an extension to enclose in Quate. However, I could not find an extension to enclose with ==. The following code did not work.

// #popclip
// name: Surround with ==
// icon: iconify: s
// language: javascript

var text = PopClip.getSelectedText();
var newText = “=” + text + “=”;
PopClip.replaceSelectedText(newText);

Hera ya go:

// #popclip
// name: Surround with ==
// icon: S
// language: javascript
popclip.pasteText("=" + popclip.input.text + "=");
1 Like

I did not try this before, but it opens funny possibilities

// #popclip
// name: Surround with 😂😂
// icon: Smile
// language: javascript
popclip.pasteText("😂" + popclip.input.text + "😂");

Nice :slight_smile: When posting code on the forum, it is important to format it as code. The easy way to do that is to type three backticks like this ``` on the line before the code, and again on the line after. For example

```
my code
```

which comes out as

my code

This prevents the forum software turning your "" into “”.

1 Like