Problem/Motivation
Hi,
I'm trying to set up a feature on text editor that will allow me to input text for the "title" attribute in images, so the title shows up as the tooltip when hovering over the image.
I have created a custom field in the EditorImageDialog form. However, it won't save and won't be applied to the image.
If I try to hardcode it via the option in the editor, it shows up on the front end, but when opening the Image Dialog to edit it, it's not populated.
The image dialog form is created and populated with the values from $form_state->getUserInput()['editor_object']. However, the title attribute is never a part of this array.
How can I achieve this?
Thanks,
André
Steps to reproduce
1. Add "Text (formatted, long)" field to any CT
2. Try to add Image
3. Try to add Title attribute to image
Comments
Comment #2
cilefen commentedLike this? https://www.drupal.org/project/editor_advanced_image
Comment #3
andrerdiogo commentedExactly what I needed! Thanks a lot @cilefen.