Soo ... I have an inDesign-document with one big text frame that contains multiple paragraphs with different paragraph styles. In that, I would like to have some paragraphs have a stroke and a background color. However, the strokes and fills are only applicable on the entire text frame, so I'm searching for a way to limit the strokes and fills to some paragraphs with certain paragraph styles.
Is there an arguably easy way to achieve this?
The closest I think you could get is with cell styling, but it does have its problems.
If you wanted to try it though, it is simple enough to put in place, simply
Table > Insert Table a 1x1 table in your text frame. Put whatever paragraph you want to have a fill/stroke inside that cell, then open your
Window > Styles > Cell Styles panel, and create a cell style. You can assign a fill and stroke, apply this style to multiple cells, and edit the style at any time to have changes applied to every instance in your document.
Object Styles (
Window > Styles > Object Styles)
As suggested by @John-Manly, it is easy to just draw a background box. Additionally, you can set an Object Style so that you can apply/edit that same style for boxes behind multiple paragraphs. However, if your text flow or paragraph size changes, the background box will no longer be sized/positioned properly.
This is likely a poor solution based on your initial request, but if you can do without left and right stroke, and without a background color, you could define Before and After paragraph rules in the paragraph style box. This will put horizontal lines above and/or below your paragraph automatically.
You have to highlight the text and adjust the stroke properties of the text itself and not of the text frame. Say I have a text frame with several paragraphs, as shown below:
You can highlight the paragraph that you want stroked (giggity) and then adjust its stroke the same way you would anything else:
You can do this for any selection of text; letters, words, sentences, paragraphs, etc.). You can mix and match colors, weights, whatever you want.
To adjust the stroke properties, go to WINDOW > STROKE or select the stroke window from the right-hand tool bar:
As for the background colors, I honestly think that the quickest and easiest way to go about that would be to just create a rectangle behind the paragraph and fill it with whichever color you want.