- 🇩🇪Germany mxh Offenburg
Is there a core issue around for ckeditor5? Can't find it right now. The problem seems to still exist when setting
$element['#disabled'] = TRUE;
on an input element that makes use of ckeditor.
On a Standard Installation of Drupal (8.6.x), If you use states-FAPI (by code or "conditional fields" contrib module ) which disabling/enabling a wysiwyg field.
The disabling/enabling action on field works (I.E. : the field label change from grey to black and return), but the Wysiwig iframe (Ckeditor) remais enabled / disabled (original state)
- Install Standard Drupal (8.6.x)
- add state on "body" field of "article" node : disabled until title are filled
code exemple :
function my_module_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['body']['#states'] =
[
'disabled' => [
':input[name="title[0][value]"]' => ['filled' => FALSE],
],
];
}
- create a article
=> The body field are disabled (title in grey, wysiwyg disabled)
- fill the title
=> The body field are "enabled" (title in black)
==> But you can't write the body
Thanks
Edit : rewrite Summary
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Is there a core issue around for ckeditor5? Can't find it right now. The problem seems to still exist when setting $element['#disabled'] = TRUE;
on an input element that makes use of ckeditor.