How to transform codes in hotkeys

I wanna insert a shortcut

Hi everyone!
To explain myself better, I downloaded Obsidian some days ago. I’m not a programmer, and usually I don’t use HTML code.

I saw that in Obsidian, when I want to make a text bold with Ctrl+B, text becomes bold with 2 asterisks in front and behind the text I selected, like this: ** text **.

But I wish to write also underlined text. Ctrl+U seems to work, generating the code “< u >text< /u >”.

But when I combine this two commands Obsidian seems doesn’t work
(example: “< u >** text ** < /u >” or “** < u >text< /u > **”).

Now I find out that writing “< u >< b > text < /b >< /u >” works! But I don’t know how to create a shortcut for this “< b > code”, how to replace ** text ** with < b >text< /b > using Ctrl+B shortcut.

Is there a way to make this for noob people?

(I apologize if in the forum there is already a similar topic, I try to search the solution but I didn’t find out).

This isn’t a vanilla Obsidian feature. It’s coming from a plugin, I suspect.

You could have a look at the simple but super useful GitHub - manic/obsidian-wrap-with-shortcuts: Wrap selected text in custom tags with shortcuts. plugin.

You’ll need to write the syntax yourself, but once you’ve sorted it out, you can save and set it to a hotkey.

1 Like

Thank u! You saved me! QwQ <3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.