How to copy and paste shape styles and work with default styles in draw.io

In the Style tab of the Format panel (if you don’t see this by default in draw.io, you can activate it via Menu > View > Format Panel) you will find a section that deals with editing and applying shape styles.

The Edit Style button allows you to edit the defaults of shapes and connectors directly in the code. More often, however, you will need these other two functions.

You have defined a shape style and want to apply it to all newly created shapes?
No problem at all. Select the desired shape and click on the Set as Default Style button. From now on, the formatting will be applied to all shapes that you drag from the Shape library onto your canvas.

You want to apply a style to existing shapes?
This is no problem either. Select the desired shape, click on the Copy Style button, select the other shapes you want to adapt, and click on the Paste Style button.