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

Stefan Lehmann’s picture

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!