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

How to programmatically control the visibility of custom toolbar button #267

Open
rastermechanism opened this issue Jul 25, 2024 · 0 comments

Comments

@rastermechanism
Copy link

rastermechanism commented Jul 25, 2024

Jodit Version: 3.4.xxxxx

Browser: Chrome
OS: Windows
Is React App: True

buttons: [
			{
				name: 'Mycustombutton1',
				tooltip: 'Mycustombutton1',
				icon: `<svg path></svg>`,
				exec: async (instance) => {										
					// need way to remove Mycustombutton1 button from toolbar
					// something like instance.editor.remove etc 
				}
			},
			'|', 'bold', 'italic',
			'|', 'table', '|', 'image',
		],

This is to limit the user to click Mycustombutton1 only once. I thought removing would be easy but seems tough, if that is not possible then even disabling would be also acceptable, just give me some pointer.

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

1 participant