react-trix
react-trix copied to clipboard
Only show and hide some menu at toolbar
customize toolbar for customize showing menu
Thank @muh-hizbe yes this is certainly something that would be helpful.
I have no time at the moment to work on react-trix, but I'm happy to review / help anyone that would want to take this one.
@dstpierre i would have some time over the weekend to work on this. Do we have any idea how we'd want this to look like?
@claeusdev that's great. I don't have much preference to be honest. From what I understand, the toolbar configuration is done via the Trix.config if I'm not mistaken.
I guess TrixEditor would need to accept a new property that describe what the user wants for their toolbar and apply this when the component creates the underlying trix component.
I suppose you could start by adding a new function in the componentDidMount line:77 that would run if the caller provided a value for the custom toolbar property.
This function would apply anything to the toolbar.
This is just an idea, feel free to explore and ask questions if you have any.