Bulk Formatting: How to Change the format of multple blocks at the same time?

Lets say I had a list of blocks/bullets on a page, and I wanted to turn them all into H1s:
image

How could I go about changing them all into H1s at the same time? Right-clicking only changes the first one.

Right now, I’m pasting them all into Word, turning them into headings, copying them again, and pasting them back into Logseq, but there must be a more efficient way.

There isn’t an automatic way to do it in Logseq. I could add this to the logseq-randomutils-plugin. Other than bulk formatting to H1, what other bulk formatting options do you think will be helpful?

1 Like

@hkgnp That would be lovely, thank you!

Can’t think of anything else, besides headings of all levels… I’m using a customized version of logseq-plugin-wrap, but it has some limitations.

You can try the latest version of logseq-randomutils-plugin.
Highlight the blocks, and activate Command Palette using “mod+shift+p”, and then type “Format Text”. Make the necessary changes as you require.

Supports all the headers, bold and italics.

3 Likes

Could you support auto-heading too?

On the same context menu for headings, after H6, there is a button HA to set that block as auto-heading. Logseq saves the state with a hidden property: heading:: true.

Done in latest version.

Thank you! Unfortunately, the utility doesn’t seem to work on my end. My app froze after I selected “Format Text”, and I couldn’t click on anything. Would it be possible to share a screen recording of how it works?

I also just learned that you could bulk add TODOs to blocks by right-clicking!! Having an extra menu item for headings would be a dream…

Update: I’ve found another extension that can bulk add headings: logseq-plugin-heading-level-shortcuts

You just have to select all the blocks and hit CTRL + [heading number].

Here’s a demo:


Unfortunately, it doesn’t seem to support auto-heading @alex0, so @hkgnp’s updated plugin may be your best bet.

Nice, that’s a fantastic implementation!

This plugin is very handy!

@hkgnp the autoheading feature works as expexted, thank you!

Replying to you, because your plugin may be the best way to do it if this isn’t something that is already doable…
Along with headings and things can you change the background color of multiple blocks at a time?