Modifying the default toolbar in Trix

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • trix

    A rich text editor for everyday writing

  • 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!` }

  • exploring-trix

    A repository where I explore how to extend Trix.

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts