Use case or problem
If you select multiple paragraphs and hit a keyboard shortcut to Bold, Italicise, Strikethrough, etc, Obsidian will just insert **
or ~~
or the like at the start of the first paragraph and end of the last one.
This does not result in the expected formatting.
Instead, Obsidian could insert the the **
or ~~
markers at the start and end of each paragraph in the selection.
This would match expected behaviour. E.g., this is what happens in Dynalist. You select multiple list items, hit Bold, and markers are inserted inside each item.
Will this be a surprising change?
The user has a clear, unambiguous intent. They selected multiple paragraphs. They want to bold them. Right now, it doesn’t. The current behaviour with multiple paragraphs doesn’t accomplish much, so changing the current behaviour shouldn’t be a problem.
Proposed solution
Change logic for applying inline styles like bold, italics, highlights, and strikethrough so that:
if multiple paragraphs are selected, then markers are inserted for each paragraph.
If the first or last paragraph are only partially selected (not the entirety), then that case is handled appropriate to only bold that part of the paragraph.
Paragraphs are defined as being separated by blank lines, where by blank lines I mean a line consisting only of spaces. This logic matches the behaviour of the inline style. E.g.
**Bold
across newlines
like this**
works but
**Bold across
newlines when there’s a
a blank line with or without spaces
doesn’t work**
Current workaround
The current behaviour of trying to apply an inline style across paragraph does nothing! Instead, just have to insert the markers manually for each paragraph.
Having the feature to easily apply styles to multiple paragraphs would be a great help.