Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show and hide some menu at toolbar #53

Open
muh-hizbe opened this issue Apr 10, 2022 · 3 comments
Open

Only show and hide some menu at toolbar #53

muh-hizbe opened this issue Apr 10, 2022 · 3 comments

Comments

@muh-hizbe
Copy link

customize toolbar for customize showing menu

@dstpierre
Copy link
Collaborator

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.

@claeusdev
Copy link

@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?

@dstpierre
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants