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

insertImage button not disabling like the others #5442

Closed
WandersonAlves opened this issue Dec 28, 2017 · 1 comment
Closed

insertImage button not disabling like the others #5442

WandersonAlves opened this issue Dec 28, 2017 · 1 comment
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@WandersonAlves
Copy link

Hi all!

When i set ckeditor to disabled state, all buttons of toolbar get disabled with exception of insertImage button.

Below is my current toolbar in action with disabled state:

image

Below is my config for editor:

private _getCkConfig(): any {
		return {
			toolbar: ['headings', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'insertImage', 'undo', 'redo'],
			ckfinder: {
				uploadUrl: `${environment.endPoint}comunicados_anexos/upload`
			},
			language: 'pt-br',
			image: {
				toolbar: [
					'imageTextAlternative',
					'|',
					'imageStyleFull',
					'imageStyleAlignLeft',
					'imageStyleAlignCenter',
					'imageStyleAlignRight'],
				styles: [
					'imageStyleFull',
					'imageStyleSide',
					'imageStyleAlignLeft',
					'imageStyleAlignCenter',
					'imageStyleAlignRight'
				]
			}
		};
	}

I disable the editor in runtime by a ngOnChanges event:

ngOnChanges({ckDisable}: SimpleChanges): void {
		if (this.editor && ckDisable && ckDisable.currentValue) {
			this.editor.isReadOnly = ckDisable.currentValue;
		}
}

This is a bug or i'm missing something to disable image button?

Currently using @ckeditor/ckeditor5-build-classic with Angular 4

Fun fact: unlike the others buttons, the imageButton is wrapped inside a span

image

@oskarwrobel
Copy link
Contributor

Good catch, thanks. I created a ticket in ckeditor-upload repo https://github.com/ckeditor/ckeditor5-upload/issues/77. Should be fixed soon.

pjasiun referenced this issue in ckeditor/ckeditor5-upload Jan 8, 2018
Fix: Fixed incorrect `ImageUploadButton` and `ImageUploadCommand` binding. Closes #77. Closes https://github.com/ckeditor/ckeditor5-ui/issues/357.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 14 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants