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

Display inline toolbar programmatically #2473

Open
zeinabzahran opened this issue Sep 11, 2023 · 1 comment
Open

Display inline toolbar programmatically #2473

zeinabzahran opened this issue Sep 11, 2023 · 1 comment

Comments

@zeinabzahran
Copy link

Is there a way to display inline toolbar programmatically?

@hjpidd
Copy link

hjpidd commented Oct 14, 2023

You can use the toggleToolbox method of the Toolbar API. Obviously this is available if you save the editor somewhere in your state, or call it from a function to which the editor passes the api in the params (e.g., onChange). Once the editor is ready, invoke api.toolbar.toggleToolbox(true).

I struggled to find this for a little while because the toggleToolbox method isn't in the docs for the Toolbar API. It's very handy if you want to implement a Notion-like editor in which the user can open the toolbar by typing '/' or something.

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

No branches or pull requests

2 participants