Currently, the module is implementing hook_element_info_alter in order to register custom pre_render method for checking and post_render on form elements for loading the ckeditor_link settings, styles and scripts (in ckeditor_link_form_post_render).
This is working pretty well, as long as we don't have any js bahaviour interfering. When for example ajax is used to load the text form element, this is not working anymore.
Popular example would be loading forms via:
- https://www.drupal.org/project/field_collection
- https://www.drupal.org/project/inline_entity_form
- Probably edit module? (havent test this one)
Attached patch tested with inline_entity_form and without.
Comment | File | Size | Author |
---|---|---|---|
#2 | ajax-form-not-working-2382077-2.patch | 1021 bytes | bogdan.racz |
#1 | use-wysiwyg-editor-settings-alter-2382077-1.patch | 2.85 KB | Hydra |
Comments
Comment #1
Hydra CreditAttribution: Hydra commentedComment #2
bogdan.racz CreditAttribution: bogdan.racz commentedI have observed that when loading form elements with AJAX, not the whole form is rendered and so the form "post render" is not triggered.
A possible solution is to attach the post render function on the "text format" element itself, not on the form.
Attached patch works with inline_entity_form and ckeditor module installed.
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedPatch in #2 worked for me, thanks!
Comment #4
kevincrafts CreditAttribution: kevincrafts commentedPath in #2 worked for me too.
Comment #5
steel-track CreditAttribution: steel-track commentedI can verify patch in #2 works as well. Setting to RTBC since four people have verified.
Comment #6
anrikun CreditAttribution: anrikun commentedComment #8
anrikun CreditAttribution: anrikun commentedCommitted, thanks!