EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

disabled TextEditorField is not really disabled

Open Geolim4 opened this issue 11 months ago • 1 comments

Describe the bug Hello, when you add a disabled TextEditorField, the field is not disabled, however data modification are ignored, the WYSIWYG/Ckeditor is not really disabled (but the hidden textarea is disabled however).

Geolim4 avatar Mar 16 '24 18:03 Geolim4

A temporary CSS workaround is to trick the editor to limit user interaction and emulate a read only field:

textarea.ea-text-editor-content[disabled] + .ea-text-editor-wrapper {
  pointer-events: none;
  filter: contrast(75%);
  opacity: 0.8;
  user-select: none;
}

It is not perfect but better than nothing. And anyway the disabled level from symfony discards every modifications done to the field.

Geolim4 avatar Mar 16 '24 19:03 Geolim4