# Registering new formats

**URL:** https://discourse.roots.io/t/registering-new-formats/27172
**Category:** sage
**Tags:** bud, gutenberg, sage10
**Created:** 2024-05-17T19:04:10Z
**Posts:** 2

## Post 1 by @pete87p — 2024-05-17T19:04:10Z

Hi,

I have tried to register a new format without any luck. I have the following below. Could anyone point to the right of how to register a new format? Thank you in advance.

editor.js

roots.register.formats(‘@scripts/formats’)

scripts/formats/test.format.js

export default {  
name: `bud-project/example-format`,  
title: `Example format`,  
tagName: ‘span’,  
className: ‘example-format’,  
}

---

## Post 2 by @ben — 2024-05-21T16:39:28Z

Here’s an example from the bud repo:

> <https://github.com/roots/bud/blob/35861a7589439046bcc94511d1c6aba01da22a58/examples/wordpress-editor/src/underline.format.js>
