joethei / obsidian-plantuml

Generate PlantUML Diagrams inside Obsidian.md
MIT License
368 stars 18 forks source link

Center resulting image #18

Closed domhel closed 2 years ago

domhel commented 2 years ago

Hi, I would like to center the resulting image. Putting <center> ... </center> around the code doesn't work because it will view the plantuml code as plain text.

Is there a way to do that?

Thanks

joethei commented 2 years ago

This css snippet will the output of the png and svg renderer.

div.block-language-plantuml{
    text-align: center;
}

div.block-language-plantuml-svg{
    text-align: center;
}

For a single diagram you can build a snippet with the Markdown Attributes plugin.