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

toolbarHiddenButtons has no effect #544

Open
bureaug opened this issue Nov 6, 2023 · 1 comment
Open

toolbarHiddenButtons has no effect #544

bureaug opened this issue Nov 6, 2023 · 1 comment

Comments

@bureaug
Copy link

bureaug commented Nov 6, 2023

I am trying to reduce the number of buttons shown in the toolbar. I've tried it with V3.0.0-beta.0 as well as with V2.1.0 with no effect whatsoever.

Here is my config:

	public editorConfig: AngularEditorConfig = {
		editable: true,
		enableToolbar: false,
		showToolbar: true,
		defaultParagraphSeparator: '<p>',
		sanitize: true,
		fonts: [],
		toolbarHiddenButtons: [
			[
				'underline',
				'strikeThrough',
				'subscript',
				'superscript',
				'indent',
				'outdent',
				'insertUnorderedList',
				'insertOrderedList',
				'heading',
			],
			[
				'backgroundColor',
				'customClasses',
				'insertImage',
				'insertVideo',
				'toggleEditorMode'
			]
		]
	};

Here is the template

<angular-editor formControlName="body" [config]="editorConfig"></angular-editor>

I get no errors, no warning and alas full toolbar. Any ideas why this happens?

@bureaug
Copy link
Author

bureaug commented Nov 6, 2023

Found the problem. The hidden buttons are marked with "hidden" attribute which is not defined at any imported styles. If I remember correctly, it was (is?) included in one of the bootstrap imports (which I obviously do not use). I believe this is an easy fix to include into the styles, otherwise this dependency should be mentioned in the docs.

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