Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Optimize RTE page
Browse files Browse the repository at this point in the history
Main point it to add examples for setting a preset via page TSconfig.

Additionally, the following changes are made:

- add a header for the examples (since examples are now extended
  and this improves finding the examples when skimming the page)
- add clarification what "order" (for the presets) means. If not
  familiar with TYPO3 one might assume, the order means that the
  later settings overrides the previous which is not the case:
  once a setting is set, the ones following it are ignored.
- clarify what default (number 4. in the listing of "order")
  means
- add some links
  • Loading branch information
sypets committed Nov 8, 2023
1 parent 10ab5d8 commit b1e49fb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
47 changes: 42 additions & 5 deletions Documentation/PageTsconfig/Rte.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ The `RTE` prefix key is used for configuration of the Rich Text Editor.
Please refer to the :ref:`RTE chapter <t3coreapi:rte>` in Core API document
for more general information on RTE configuration and data processing.

The order in which configuration for the RTE is loaded is:
The order in which configuration for the RTE is loaded is (the first one which
is set, is used, see :ref:`example <pageTsRteOverridePreset>` below):

1. preset defined for a specific field via PageTS
2. richtextConfiguration defined for a specific field via TCA
3. general preset defined via PageTS
4. default
2. :ref:`richtextConfiguration <t3tca:columns-text-properties-richtextConfiguration>`
defined for a specific field via TCA
3. general preset defined via PageTS (:typoscript:`RTE.default.preset`)
4. default (the preset "default", e.g. as defined by EXT:rte_ckeditor or overridden
in :file:`ext_localconf.php`)

The full property path building is a bit more complex than for other
property segments. The goal is that global options can be set that can
Expand All @@ -33,7 +36,17 @@ Configure RTE for a specific field in a table
Configure RTE for a specific field in a table for a specific :ref:`record type <t3tca:types>`
`RTE.config.[tableName].[fieldName].types.[type]`

Consider the following Page TSconfig examples:
Configuring RTE via page TSconfig is general and not specific to a
specific RTE editor, however TYPO3 comes with EXT:rte_ckeditor, so this
will usually be used. This page covers only the general configuration, for
more information about configuring rte_ckeditor, see the
:ref:`rte_ckeditor configuration <ext_rte_ckeditor:configuration>`.

Examples
========

Example: Disable RTE
--------------------

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
Expand All @@ -59,6 +72,30 @@ Consider the following Page TSconfig examples:
# But disable RTE for tt_content bodytext again if the record type is "text"
RTE.config.tt_content.bodytext.types.text.disabled = 1
.. _pageTsRteOverridePreset:

Example: Override preset
------------------------

Check the description of the order above to see which setting overrides which.

Summary:

* Setting the preset via page TSconfig *for a specific field* overrides all
else
* TCA richtextConfiguration (for a specific field) overrides the page TSconfig
default preset (:typoscript:`RTE.default.preset`)

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
# set a default preset to use as fallback
RTE.default.preset = custom_preset_default
# Override preset for field "description" in table "tt_address"
RTE.config.tt_address.description.preset = custom_preset_fancy
Properties
==========

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ext_lowlevel = https://docs.typo3.org/c/typo3/cms-lowlevel/main/en-us/
# ext_recycler = https://docs.typo3.org/c/typo3/cms-recycler/main/en-us/
# ext_redirects = https://docs.typo3.org/c/typo3/cms-redirects/main/en-us/
# ext_reports = https://docs.typo3.org/c/typo3/cms-reports/main/en-us/
# ext_rte_ckeditor = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/
ext_rte_ckeditor = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/
# ext_scheduler = https://docs.typo3.org/c/typo3/cms-scheduler/main/en-us/
# ext_seo = https://docs.typo3.org/c/typo3/cms-seo/main/en-us/
# ext_t3editor = https://docs.typo3.org/c/typo3/cms-t3editor/main/en-us/
Expand Down

0 comments on commit b1e49fb

Please sign in to comment.