In Typo3 I have a content element with a plain text field (no RTE / CKEditor field). In case a user enters an e-mail address, it should be automatically converted into an e-mail link. How can I achieve this with Typoscript or even directly in Fluid-Script?
This is my approach: per <f:cObject ... /> pass the text to a typoscript, which searches for an @-character, selects the whole word and then adds the corresponding A-tags:
<f:cObject typoscriptObjectPath="lib.emaillink" data={adrtxt: tx_mask_cnt_consultation_adr_item_txt} />
lib.emaillink = COA
lib.emaillink {
5 = LOAD_REGISTER
5 {
dAdrTxt.data = field:adrtxt
}
10 = TEXT
10 {
data = register:dAdrTxt
# Search for '@', select whole word, add A-tags ... ?
}
}
Thank you in advance for any help!
replacementwith regular expression should solve this. - Julian Hofmann