Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The longdesc attribute is removed by the editor when using advanced image, if it's added to the extended_valid_elements in tinymce.inc it won't get removed anymore. See the attached patch.
Comment | File | Size | Author |
---|---|---|---|
#3 | wysiwyg-tinymce-longdesc.1398560.3.patch | 792 bytes | TwoD |
#1 | wysiwyg.patch | 732 bytes | markwittens |
wysiwyg.patch | 333 bytes | markwittens |
Comments
Comment #1
markwittens CreditAttribution: markwittens commentedLast patch was created without the right parameters, attached is the right patch.
Comment #2
ckrinaI'm having the same issue in Drupal 7, in CKEditor.
Any ideas to fix it? Thank you.
Comment #3
TwoDAdding longdesc there works and the attribute is valid (though not commonly used AFAIK).
The patch was created from the wrong folder (wysiwyg/editors), instead of the root wysiwyg folder, re-rolled it for you.
I did a quick
grep -r longdesc ckeditor
, which revealed that the word 'longdesc' is only used in the iframe plugin, not the image plugin, so I guess CKEditor doesn't support it.CKEditor does not use an externally supplied tag/attribute whitelist in the same matter TinyMCE does anyway so we could probably not have changed it.
Comment #4
sunThanks, looks good!
Comment #5
TwoDCommitted #3 to D5, D6 and D7. Thanks for spotting this!
The patch will be in the -dev snapshots within 12hrs and it'll be part of the next release.
Comment #6
mgiffordIt's not very commonly used, but very happy to see available here.
Comment #7
mgifford