0

TYPO3 converts URLs written in text into links, including those in code and pre tags. In ckeditor, links look normal as text, but in the frontend they turn into links. I've tried disabling the autolink plugin via my own configuration in the site package, but that doesn't help. How to disable converting text to links on the frontend? TYPO3 version - 11.5

Example In ckeditor:

<pre><code>Redirect 301 /pagename.php http://www.example.com/pagename.html</code></pre>

In frontend:

<pre><code>Redirect 301 /pagename.php <a href="http://www.example.com/pagename.html" target="_blank" rel="noreferrer">www.example.com/pagename.html</a></code></pre>

I would completely disable this feature. And why the system formats into the ' pre' or ' code ' tag, I don't understand at all.

In addition, if I want to write an 'a' tag in 'code', it is also converted into a link, this is wrong.

Update: This only happens in news posts (tx_news), in a text editor. There is no conversion on regular pages (text content elements).

filippoff
  • 1
  • 1

1 Answers1

1

Fundamentals about configuration of ckeditor in TYPO3:

In common sitepackages there exists a file to configure the ckeditor in Configuration/Yaml/rte_ckeditor/Default.yaml. The configuration in this file is some kind of science by itself and can be influenced in many kinds, documentation about it can be found here (take care about the correct version): https://ckeditor.com/.

This configuration file is likely implemented in TYPO3 in your sitepackage in the file ext_localconf.php by this line:

$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets'][$extensionKey] = 'EXT:' . $extensionKey . '/Configuration/RTE/Default.yaml';

instead of $extensionKey the extensionKey might be noted directly without variable.

If you've questions concerning ckeditor directly, i.e. about removing p-tags or other wrappings, I'd advisee to search for those questions or post an own one especially about the issues you want to solve.

Link related handling in TYPO3

TYPO3 is using some own notations for internal links, those are useless if they are used without conversion to real links: t3://page?uid=51. Details about that format and link handling in general you find on this page: https://docs.typo3.org/m/typo3/reference-typoscript/11.5/en-us/Functions/Typolink.html.
Anyway, the parsing of any text fields is done usually by viewHelpers which are using either lib.parseFunc or lib.parseFunc_RTE, there some magic concerning links is defined:

enter image description here

The TypoScript library which is used (lib.parseFunc or lib.parseFunc_RTE) can be configured in ViewHelpers, this is described here: https://docs.typo3.org/other/typo3/view-helper-reference/11.5/en-us/typo3/fluid/latest/Format/Html.html

My answer might be a bit diffuse but so is the question. If you've more detailed questions, create new ones with more detailed description what to solve in detail and each one only with one topic.
Nevertheless I hope you get a start with the links I posted.

EDIT:
Important might be still how TYPO3 includes the ckeditor and which transformations are performed by TYPO3.
It'*s a larger chapter with several pages: https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/Rte/Index.html

David
  • 5,882
  • 3
  • 33
  • 44