Hi! This might be a stupid question, but can block widgets inherit a line decoration? I have a line decoration for indents and hanging indents, and a block widget can be an image, code chunk output, etc., and the goal is to have the block widgets stay aligned with the indent, so for example if there’s an image link and the text is indented, the image preview widget should also inherit the indent set by a line decoration.
Is there a way to easily handle this? The other approach I’m thinking of is to set the updateDOM
of the widget to check the indent of the preceding cm-line
and copy the indent style from there. I guess I can check the indent on creation of the widget, but right now the indent line decoration is handled by a different ViewPlugin
.