You can override or add custom CSS to a specific bridge during initialization using the configureCSS method. This method is called on the bridge object (e.g., CodeBridge.configureCSS(cssString)).
Important: When using bridgeExtensions, ensure you spread the TenTapStartKit before your extended plugins, as duplicate plugins will be ignored.
Note that calling configureCSS more than once on the same bridge will override the previous CSS configuration.
const customCodeBlockCSS = `
code {
background-color: #ffdede;
border-radius: 0.25em;
border-color: #e45d5d;
border-width: 1px;
border-style: solid;
box-decoration-break: clone;
color: #cd4242;
font-size: 0.9rem;
padding: 0.25em;
}
`;
const editor = useEditorBridge({
// ... other config
bridgeExtensions: [
// It is important to spread StarterKit BEFORE our extended plugin,
// as plugin duplicated will be ignored
...TenTapStartKit,
CodeBridge.configureCSS(customCodeBlockCSS),
],
});