From b1e49fb7e10b1603767323a3825e4235c0d24d58 Mon Sep 17 00:00:00 2001 From: Sybille Peters Date: Wed, 8 Nov 2023 08:10:04 +0100 Subject: [PATCH 01/11] Optimize RTE page 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 --- Documentation/PageTsconfig/Rte.rst | 47 ++++++++++++++++++++++++++---- Documentation/Settings.cfg | 2 +- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 65de758e..b472679d 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -13,12 +13,15 @@ The `RTE` prefix key is used for configuration of the Rich Text Editor. Please refer to the :ref:`RTE chapter ` 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 ` 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 ` + 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 @@ -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 ` `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 `. + +Examples +======== + +Example: Disable RTE +-------------------- .. code-block:: typoscript :caption: EXT:site_package/Configuration/page.tsconfig @@ -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 ========== diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index d251de4e..29004ca7 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -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/ From 84bd8b85b3d7df14504c4cc7a8ea25ab1172767c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:33:02 +0100 Subject: [PATCH 02/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index b472679d..86035283 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -13,7 +13,7 @@ The `RTE` prefix key is used for configuration of the Rich Text Editor. Please refer to the :ref:`RTE chapter ` 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 first one which +The order in which the configuration for the RTE is loaded is (the first one which is set, is used, see :ref:`example ` below): 1. preset defined for a specific field via PageTS From 2abaebddcfab65e33338bc84da6c9ae01e371a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:34:23 +0100 Subject: [PATCH 03/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 86035283..4d9f92ee 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -14,7 +14,7 @@ Please refer to the :ref:`RTE chapter ` in Core API document for more general information on RTE configuration and data processing. The order in which the configuration for the RTE is loaded is (the first one which -is set, is used, see :ref:`example ` below): +is set will be used, see :ref:`example ` below): 1. preset defined for a specific field via PageTS 2. :ref:`richtextConfiguration ` From d4917cba94c0b16360a86b562d82b5220163019b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:34:54 +0100 Subject: [PATCH 04/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 4d9f92ee..51944b28 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -16,7 +16,7 @@ for more general information on RTE configuration and data processing. The order in which the configuration for the RTE is loaded is (the first one which is set will be used, see :ref:`example ` below): -1. preset defined for a specific field via PageTS +1. preset defined for a specific field via page TSconfig 2. :ref:`richtextConfiguration ` defined for a specific field via TCA 3. general preset defined via PageTS (:typoscript:`RTE.default.preset`) From 8acaa874f2e476b84957a7d3351fee284a4f1bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:35:37 +0100 Subject: [PATCH 05/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 51944b28..24cd8f02 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -19,7 +19,7 @@ is set will be used, see :ref:`example ` below): 1. preset defined for a specific field via page TSconfig 2. :ref:`richtextConfiguration ` defined for a specific field via TCA -3. general preset defined via PageTS (:typoscript:`RTE.default.preset`) +3. general preset defined via page TSconfig (:typoscript:`RTE.default.preset`) 4. default (the preset "default", e.g. as defined by EXT:rte_ckeditor or overridden in :file:`ext_localconf.php`) From 9849e33e1450b600d5f30ae71813102de6ba2761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:38:25 +0100 Subject: [PATCH 06/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 24cd8f02..05ed2a6a 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -37,7 +37,7 @@ Configure RTE for a specific field in a table for a specific :ref:`record type < `RTE.config.[tableName].[fieldName].types.[type]` Configuring RTE via page TSconfig is general and not specific to a -specific RTE editor, however TYPO3 comes with EXT:rte_ckeditor, so this +particular 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 `. From 062f49e903e40cf68e6c76cf4a38033b34f83d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:39:07 +0100 Subject: [PATCH 07/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 05ed2a6a..366d0a90 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -37,7 +37,7 @@ Configure RTE for a specific field in a table for a specific :ref:`record type < `RTE.config.[tableName].[fieldName].types.[type]` Configuring RTE via page TSconfig is general and not specific to a -particular RTE editor, however TYPO3 comes with EXT:rte_ckeditor, so this +particular rich-text 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 `. From 5b0b5194838efceec04d61b3d0f5a2545456df66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:40:15 +0100 Subject: [PATCH 08/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 366d0a90..c33698ff 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -37,7 +37,7 @@ Configure RTE for a specific field in a table for a specific :ref:`record type < `RTE.config.[tableName].[fieldName].types.[type]` Configuring RTE via page TSconfig is general and not specific to a -particular rich-text editor, however TYPO3 comes with EXT:rte_ckeditor, so this +particular rich-text editor. However, TYPO3 comes with EXT:rte_ckeditor, so this one will usually be used. This page covers only the general configuration, for more information about configuring rte_ckeditor, see the :ref:`rte_ckeditor configuration `. From 56824531e9f4909d841dff9a5986f6c1c184c6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:40:41 +0100 Subject: [PATCH 09/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index c33698ff..b4aec483 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -39,7 +39,7 @@ Configure RTE for a specific field in a table for a specific :ref:`record type < Configuring RTE via page TSconfig is general and not specific to a particular rich-text editor. However, TYPO3 comes with EXT:rte_ckeditor, so this one will usually be used. This page covers only the general configuration, for -more information about configuring rte_ckeditor, see the +more information about configuring EXT:rte_ckeditor, see the :ref:`rte_ckeditor configuration `. Examples From 85c9fa3fde878b2eabcbf9058f1027246373dbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:42:31 +0100 Subject: [PATCH 10/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index b4aec483..915cf02a 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -77,7 +77,7 @@ Example: Disable RTE Example: Override preset ------------------------ -Check the description of the order above to see which setting overrides which. +Refer to the description of the order above for details of which setting has priority over which. Summary: From d2f9b1b3eca7d48b50edb410c42b2b2f989a115e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:43:20 +0100 Subject: [PATCH 11/11] Update Documentation/PageTsconfig/Rte.rst --- Documentation/PageTsconfig/Rte.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/PageTsconfig/Rte.rst b/Documentation/PageTsconfig/Rte.rst index 915cf02a..7500e420 100644 --- a/Documentation/PageTsconfig/Rte.rst +++ b/Documentation/PageTsconfig/Rte.rst @@ -81,7 +81,7 @@ Refer to the description of the order above for details of which setting has pri Summary: -* Setting the preset via page TSconfig *for a specific field* overrides all +* 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`)