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.
By johnnny83 on
At the bottom of the page of this issue (https://www.drupal.org/node/301234) there is a preprocess hook to open field files in a new window. Is it also possible to write a hook, so that all files are opened in a new windows, i.e. inline linked files too? And maybe also external links, so that we don't need jQuery like the External Links Module (https://www.drupal.org/project/extlink)?
Comments
As far as I know, if you
As far as I know, if you configured your WYSIWYG so, that eg. Media would provide file links it might be possible.
But if the file links are only entered by copy and paste .. I don't believe so, as the file link is not it's own entity, but only some tag in an HTML blob. You'd have to parse for it etc. A JS based solution is much easier here.
I like cookies!