Add markdown to selected text

I don’t know if this is possible at all, but for example in Obsidian I am able to select a word or sentence and then hit the backtick to automatically surround the word or sentence with a backtick (or 3 backticks for code).

Would this possible to implement here? I find myself trying this quite often, because of my extensive use of it in Obsidian.

1 Like

Sorry, you can’t. But you can select piece of text and then open the cog from toolbar and choose the first one (mine speaks Finnish… is it preformatted or something) and then it uses one tick inline and three ticks for a chapter.

Matter of taste, but adding ticks using old way is much more faster.

So, this is a feature request indeed.

My cogwheel doesn’t have that

But the default toolbar does have the Placeholder, which adds the single backtick, which is already good, along with the CMD+E shortcut.

Is the toolbar and cogwheel customizable, maybe?

We can’t format anything here. Same button, though. But I don’t know why you have it in the toolbar and I have it inside the cog :man_shrugging:

And why do you have the Chapter option and I don’t? :confused:

Because I didn’t try it. I only assumed so because without selected text it uses three ticks.

But I was totally wrong.

The correct names are inline code and code block.

`inline code`

```
code block
```

There’s a single button (and shortcut) for both preformatted text types.

If you haven’t selected any text, it will create an inline code.
If your selection is no more than 1 line, it will create an inline code.
If your selection contains a line break, it will create a code block.

As far as I know, and unfortunately, not from the interface.
See:

3 Likes

Really?

I didn`t know that line break thingy.
Everyday something new.

Thanks for clarifying on both the correct names and how it works!

I just tested your 3 options and it works. Great! :slight_smile:

There’s a Documentation topic about the code formatting:

2 Likes

Thanks for sharing this page.
I like the option of using text as the language to avoid formatting. I didn’t know that.

You can set the default language in your admin settings :+1:

Any unrecognized string will act like “text”, since “text” basically means “no highlights”.

Unless I’m wrong,

```anything

```

is the same as

```txt

```

or

```text

```
2 Likes

I see. Makes sense.

You can select code and type control-e to surround it with backticks, or touch the gear and select reformatted text. Isn’t they what you want?

Oh, but they already told you?