Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
import Trix from 'trix'; Trix.config.toolbar.getDefaultHTML = toolbarDefaultHTML; document.addEventListener('trix-initialize', updateToolbars, { once: true }); function updateToolbars(event) { const toolbars = document.querySelectorAll('trix-toolbar'); const html = Trix.config.toolbar.getDefaultHTML(); toolbars.forEach((toolbar) => (toolbar.innerHTML = html)); } /** * @see https://github.com/basecamp/trix/blob/main/src/trix/config/toolbar.coffee */ function toolbarDefaultHTML() { const { lang } = Trix.config return `Default HTML goes here!` }