I'm looking for an easy way to quickly change the font size in the selected part of the text

Things I have tried

Hello. There are many different ways to quickly highlight a text. For example, there are plugins that work very well. You can even highlight it in the colors you want. I would like to enlarge or reduce the font size of a selected part of the text to the point I want. I know, I can easily do this by typing “style font size” in Markdown. However, what I am looking for is to be able to adjust the font size with one click, just like in text highlighting. I couldn’t find a plugin for this. How can it be done. Can anyone write an idea?

What I’m trying to do

I tried to do it using templater. I think I’ve come a long way. But still it was not a very short way :slight_smile:

An easy way I could think of is to use espanso (which, by the way, is a great helper tool for a couple of things I do in obsidian…).

Insert the following code into espanso’s config file:

  - trigger: ":s"
    replace: "<font size=\"20px\">{{clipboard}}</font>"
      - name: clipboard
        type: clipboard

Then, if - in edit mode - you select text, just press ctrl + x (for cutting the selected text and pasting it to the clipboard) and then type :s

You can choose whatever trigger you like (I chose :s for “size” in my example). The : at the beginning of each trigger is important, however. And of course you can change the “20px” to any other font-size you want.

There’s also <big>text</big> and <small>text</small>

  • Older tags, big is already depreciated in HTML5
  • Doesn’t allow fine-grain control the way font size= or CSS font-size does
1 Like

alltagsverstand, It’s not exactly what I want, but it’s a great suggestion. Thank you. In addition, espanso provides many other conveniences. Therefore, your suggestion is very valuable. Thanks again.

1 Like

I just learned another method. I want to share with you. Autohotkey gave me exactly the speed I wanted. It has a very large help library. I advise. After installing the Autohotkey software from here, I wrote the following code in a notepad file and ran it with a double click.

^+s::  ; CTRL+Shift+ S hotkey
Send, {Ctrl down}c{Ctrl up}  ; Copies the selected text. 
SendInput, <span style="font-size: 50px;">{Ctrl down}v{Ctrl up}</span> 
return  ; This ends the hotkey. 

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