Attention
TYPO3 v8 has reached its end-of-life March 31st, 2020 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.
Page TSconfig¶
Warning
Some explanations and descriptions may contain slightly obsolete references. The principles are still valid though.
The RTEs can be configured by Page TSconfig. There is a top level
object named RTE
, that is used for this. The main object paths looks
like this:
Property
default.[...]
config.[ tablename ].[ field ].[...]
config.[ tablename ].[ field ].types.[ type ].[...]
Data type
Description
These objects contain the actual configuration of the RTE interface. For the properties available, refer to the table below.This is a description of how you can customize in general and override for specific fields/types.
RTE.default
configures the RTE for all tables/fields/types
RTE.config.[tablename].[field]
configures a specific field.
The values inherit the values from RTE.default
overriding them
if redefined.
RTE.config.[tablename].[field].types.[type]
configures a
specific field in case the type-value of the field matches type
.
Again this overrides the former settings.
Property
[individual RTE options]
Data type
Description
There are other options to set for the :code.`RTE` toplevel object. These depend on the individual RTEs. Please refer to their respective manuals.
Examples¶
This configuration in "Page TSconfig" will disable the RTE altogether:
RTE.default.disabled = 1
In the case below the RTE is still disabled generally, but this is overridden specifically for the table "tt_content" where the RTE is used in the field "bodytext". The "disabled" flag is set to false again which means that for Content Elements the RTE will be available.
RTE.default.disabled = 1
RTE.config.tt_content.bodytext.disabled = 0
In this example the RTE is still enabled for content elements in generally but if the Content Element type is set to "Text" (text) then the RTE will be disabled again!
RTE.default.disabled = 1
RTE.config.tt_content.bodytext.disabled = 0
RTE.config.tt_content.bodytext.types.text.disabled = 1
RTE configuration¶
The RTE object contains configuration of the RTE application. There are a few properties which are used externally from the RTE. The property "disabled" will simply disable the rendering of the RTE and "proc" is reserved to contain additional configuration of transformations.
disabled¶
Property
disabled
Data type
boolean
Description
If set, the editor is disabled.
This option is evaluated in \TYPO3\CMS\Backend\Form\FormEngine
where it determines
whether the RTE is rendered or not.
proc¶
Property
proc
Data type
Description
Customization of the server processing of the content - also called 'transformations'. See table below.
The transformations are only initialized, if they are configured
(rte_transform
must be set for the field in the
types definition in TCA).
The proc
object is processed in \TYPO3\CMS\Core\Html\RteHtmlParser
and is
independant of the particular RTE used (like transformations generally are!).
RTE-specific¶
Property
[individual RTE options]
Data type
Description
Each RTE may use additional properties for the RTE. Please refer to their respective manuals.
Processing configuration¶
This object contains configuration of the transformations used. These
options are universal for all RTEs and used inside the class
\TYPO3\CMS\Core\Html\RteHtmlParser
.
The main objective of these options is to allow for minor
configuration of the transformations. For instance you may disable the
mapping between <b>-<strong>
and <i>-<em>
tags which is done by the
'ts_transform' transformation. Or you could disable the default
transfer of images from external URL to the local server. This is all
possible through the options.
Notice how many properties relate to specific transformations only! Also notice that the meta-transformations "ts_css" imply other transformations as explained in the overview. This means that options limited to "ts_transform" will also work for "ts_css" of course.
overruleMode¶
Property
overruleMode
Data type
List of RTE transformations
Description
This can overrule the RTE transformation set from TCA.
Notice, this is a comma list of transformation keys. (Not a "dash- list" like in $TCA).
allowTagsOutside¶
Property
allowTagsOutside
Data type
string with comma separated values
Description
(Applies for "ts_transform" and "css_transform" only (function divideIntoLines))
Enter tags which are allowed outside of <P> and <DIV> sections when converted back to database.
Default is "img"
Example:
IMG,HR
allowTags¶
Property
allowTags
Data type
string with comma separated values
Description
(Applies for "ts_transform" and "css_transform" only (function getKeepTags))
Tags to allow. Notice, this list is added to the default list, which you see here:
b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blo ckquote,strike,span
If you wish to deny some tags, see below.
denyTags¶
Property
denyTags
Data type
string with comma separated values
Description
(Applies for "ts_transform" and "css_transform" only (function getKeepTags))
Tags from above list to disallow.
blockElementList¶
Property
blockElementList
Data type
string with comma separated values
Description
Comma-separated list of uppercase tags (e.g. P,HR
) that
overrides the list of HTML elements that will be treated as block elements
by the RTE transformations.
HTMLparser_rte, HTMLparser_db¶
Property
HTMLparser_rte
HTMLparser_db
Data type
Description
(Applies for "ts_transform" and "css_transform" only (function getKeepTags))
This is additional options to the HTML-parser calls which strips of tags when the content is prepared for the RTE and DB respectively. You can configure additional rules, like which other tags to preserve, which attributes to preserve, which values are allowed as attributes of a certain tag etc.
Note
This configuration is similar in TypoScript and Page TSconfig. This is why the link for the "data type" points to the TypoScript reference.
Note
The HTMLparser options, keepNonMatchedTags
and
htmlSpecialChars
are not observed. They are preset internally.
dontRemoveUnknownTags_db¶
Property
dontRemoveUnknownTags_db
Data type
boolean
Description
(Applies for "ts_transform" and "css_transform" only (function HTMLcleaner_db))
Direction: To database
Default is to remove all unknown tags in the content going to the database. (See HTMLparser_db above for default tags). Generally this is a very usefull thing, because all kinds of bogus tags from pasted content like that from Word etc. will be removed to have clean content in the database.
However this disables that and allows all tags, that are not in the HTMLparser_db-list.
allowedClasses¶
Property
allowedClasses
Data type
string with comma separated values
Description
(Applies for "ts_transform" and "css_transform" only (function getKeepTags))
Direction: To DB
Allowed general classnames when content is stored in database. Could be a list matching the number of defined classes you have.Case- insensitive.
This might be a really good idea to do, because when pasting in content from MS word for instance there are a lot of <SPAN> and <P> tags which may have class-names in. So by setting a list of allowed classes, such foreign classnames are removed.
If a classname is not found in this list, the default is to remove the class-attribute.
keepPDIVattribs¶
Property
keepPDIVattribs
Data type
string with comma separated values
Description
Comma separated list of tag attributes
(Applies for `ts_transform` and `css_transform` only (function divideIntoLines))
"align" and "class" are the only attributes preserved for <P>/<DIV> tags. Here you can specify a list of other attributes to preserve.
dontFetchExtPictures¶
Property
dontFetchExtPictures
Data type
boolean
Description
(Applies for "ts_images")
If set, images from external urls are not fetched for the page if content is pasted from external sources. Normally this process of copying is done.
plainImageMode¶
Property
plainImageMode
Data type
boolean/string
Description
(Applies for "ts_images")
If set, all "plain" local images (those that are not magic images) will be cleaned up in some way.
If the value is just set, then the style attribute will be removed after detecting any special width/height CSS attributes (which is what the RTE will set if you scale the image manually) and the border attribute is set to zero.
You can also configure with special keywords. So setting "plainImageMode" to any of the value below will perform special processing:
"lockDimensions" : This will read the real dimensions of the image file and force these values into the <img> tag. Thus this option will prevent any user applied scaling in the image!
"lockRatio" : This will allow users to scale the image but will automatically correct the height dimension so the aspect ratio from the original image file is preserved.
"lockRatioWhenSmaller" : Like "lockRatio", but will not allow any scaling larger than the original size of the image.
exitHTMLparser, entryHTMLparser¶
Property
exitHTMLparser_rte
exitHTMLparser_db
entryHTMLparser_rte
entryHTMLparser_db
Data type
boolean/HTMLparser
Description
(Applies for all kinds of processing)
Allows you to enable/disable the HTMLparser for the content before (entry) and after (exit) the content is processed with the predefined processors (e.g. ts_images or ts_transform).
There are no default values set.
User transformations¶
Property
usertrans.[user-defined transformation key]
Data type
Description
Custom option-space for userdefined transformations.
See example from section about custom transformations.