Feature: #107081 - Add options to predefine link target and class in LinkBrowser
See forge#107081
Description
The LinkBrowser now supports preconfiguring link target and class attributes. This allows administrators to set global defaults for all link types or specific defaults per handler type, reducing manual selection effort for editors.
Configuration can be set via Page TSconfig:
TCEMAIN.linkHandler.[handlerKey].(target|cssClass).default = _blank
Where handler keys correspond to link handlers that support these attributes:
- page (for page links)
- file (for file links)
- folder (for folder links)
- url (for external URL links)
- telephone (for telephone number css class)
- email (for email css class)
Global configuration (applies to all link types):
TCEMAIN.linkHandler.properties.target.default = _self
TCEMAIN.linkHandler.properties.cssClass.default = my-link-class
Handler-specific configuration (overrides global settings):
TCEMAIN.linkHandler.url.target.default = _blank
TCEMAIN.linkHandler.page.target.default = _self
TCEMAIN.linkHandler.file.cssClass.default = file-link
Hint
Note that default target
attributes of links added via the RTE are configured
individually via Page TSConfig options like:
RTE.buttons.link.properties.target.default = _blank
RTE.buttons.link.page.properties.target.default = _blank
For details, see buttons.link.[ type ].properties.target.default.
Impact
This feature improves editor workflow by providing sensible defaults for link attributes while maintaining full flexibility to override when needed. The hierarchical configuration allows both global policies and specific handler customization.