TYPO3: How to enable links to local files in RTE

Today I needed to link to a local file on a network share from a page in TYPO3. This link did not start with the usual http:// but instead with file:///. The problem was, that the rich text editor (RTE) in the backend of TYPO3 always prepends „invalid“ links with http:// and I ended up with http://file:///path-to-network-share, which of course did not work correctly.

I tried editing the RTE parse function in TYPOScript but that did not solve my problem. So, after a while of searching the internet I found the answer: append rtekeep="1" to the link like in the following example. This tells the RTE to leave the link untouched.

<a href="file:///path-to-network-share" rtekeep="1">Link to file</a>

(via tuga.at)

Über uns Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax