Feature: #100254 - Support download attribute in file link browser
See forge#100254
Description
The HTML5
download attribute can now be configured per link in
the file link browser. When set, the browser will force a file download
instead of navigating to the file URL.
The link browser renders a "Force download" checkbox for file links. When enabled, an optional "Custom filename" text field appears, allowing editors to specify an alternative filename for the downloaded file.
The TypoLink codec supports an optional seventh TypoLink segment for
download. The value
true produces a boolean download
attribute (
<a download>), while any other string value produces a
named download attribute (
<a download="custom-).
Example TypoLink strings:
t3://file?uid=42 - - - - - true
t3://file?uid=42 - - - - - report.pdf
Impact
Editors can now control per link whether a file should be downloaded or displayed in the browser. This works in both the RTE and non-RTE link browser dialogs.
Existing TypoLink values without
download remain unchanged and
continue to work as before.