From cd046a0f14d996284ea552d827178697100eb889 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 19 Jun 2025 10:58:36 +1000 Subject: [PATCH 1/3] DOC-3147: New list_max_depth option to limit list indentation. --- modules/ROOT/pages/8.0-release-notes.adoc | 29 ++++++++++++++++++- .../ROOT/pages/user-formatting-options.adoc | 2 ++ .../configuration/list_max_depth.adoc | 23 +++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 modules/ROOT/partials/configuration/list_max_depth.adoc diff --git a/modules/ROOT/pages/8.0-release-notes.adoc b/modules/ROOT/pages/8.0-release-notes.adoc index 7c62f25b54..76cc288fa3 100644 --- a/modules/ROOT/pages/8.0-release-notes.adoc +++ b/modules/ROOT/pages/8.0-release-notes.adoc @@ -1,4 +1,3 @@ - = {productname} {release-version} :release-version: 8.0.0 :navtitle: {productname} {release-version} @@ -104,6 +103,34 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a // CCFR here. +=== New `list_max_depth` option to limit list indentation +// #TINY-11937 + +{productname} {release-version} introduced a new `list_max_depth` option that allows configuration of the maximum indent depth for list items. This setting accepts a non-negative integer value, where `0` permits list creation without any indentation, and higher values set the maximum allowable indent depth. Negative values are invalid and will trigger an error. When the option is not set, list behavior remains unchanged. + +The setting applies only to list indentation and does not affect paragraph indentation. Existing content is not altered, and pasted lists that exceed the maximum indent depth will retain their structure but cannot be further indented. When multiple list items are selected, only items eligible for indentation will be indented individually—validation is applied per item, not across the full selection. + +Outdent functionality remains unaffected and always available. The state of indent and outdent controls reflects the current indentation capabilities based on this setting. + +.Example configuration + +The following example shows a basic configuration for the `list_max_depth` option, which limits list indentation to a maximum of 2 levels: + +[source,js] +---- +tinymce.init({ + selector: "textarea", + plugins: [ + "advlist", "anchor", "autolink", "charmap", "code", "fullscreen", + "help", "image", "insertdatetime", "link", "lists", "media", + "preview", "searchreplace", "table", "visualblocks", + ], + list_max_depth: 2, + toolbar: "undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", +}); +---- + +For more information, see: xref:user-formatting-options.adoc#list_max_depth[User formatting - List max depth]. [[additions]] == Additions diff --git a/modules/ROOT/pages/user-formatting-options.adoc b/modules/ROOT/pages/user-formatting-options.adoc index f1cb37ecb5..14bfd0b74a 100644 --- a/modules/ROOT/pages/user-formatting-options.adoc +++ b/modules/ROOT/pages/user-formatting-options.adoc @@ -25,3 +25,5 @@ include::partial$configuration/style_formats_autohide.adoc[] include::partial$configuration/style_formats_merge.adoc[] include::partial$configuration/text_color.adoc[] + +include::partial$configuration/list_max_depth.adoc[] diff --git a/modules/ROOT/partials/configuration/list_max_depth.adoc b/modules/ROOT/partials/configuration/list_max_depth.adoc new file mode 100644 index 0000000000..78958c9d6f --- /dev/null +++ b/modules/ROOT/partials/configuration/list_max_depth.adoc @@ -0,0 +1,23 @@ +[[list_max_depth]] +== `list_max_depth` + +The `list_max_depth` option sets the maximum nesting depth for lists (ordered and unordered). + +*Type:* `Number` + +*Default value:* No limit + +=== Required plugins + +This option requires the `lists` plugin to be enabled. +=== Example + +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'lists', + toolbar: 'bullist numlist', + list_max_depth: 2 // limits list nesting to maximum of 2 levels +}); +---- From 5a079f6a7428d05c32f6719b63911b9cb7d287bf Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 14 Jul 2025 13:13:10 +1000 Subject: [PATCH 2/3] Update modules/ROOT/partials/configuration/list_max_depth.adoc --- modules/ROOT/partials/configuration/list_max_depth.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ROOT/partials/configuration/list_max_depth.adoc b/modules/ROOT/partials/configuration/list_max_depth.adoc index 78958c9d6f..3bb2ea916c 100644 --- a/modules/ROOT/partials/configuration/list_max_depth.adoc +++ b/modules/ROOT/partials/configuration/list_max_depth.adoc @@ -10,6 +10,7 @@ The `list_max_depth` option sets the maximum nesting depth for lists (ordered an === Required plugins This option requires the `lists` plugin to be enabled. + === Example [source,js] From c0952f33c1d092c592e6600d1e3e7e004083f4be Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 14 Jul 2025 13:14:05 +1000 Subject: [PATCH 3/3] Update modules/ROOT/pages/8.0-release-notes.adoc --- modules/ROOT/pages/8.0-release-notes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/8.0-release-notes.adoc b/modules/ROOT/pages/8.0-release-notes.adoc index 76cc288fa3..a872289118 100644 --- a/modules/ROOT/pages/8.0-release-notes.adoc +++ b/modules/ROOT/pages/8.0-release-notes.adoc @@ -112,7 +112,7 @@ The setting applies only to list indentation and does not affect paragraph inden Outdent functionality remains unaffected and always available. The state of indent and outdent controls reflects the current indentation capabilities based on this setting. -.Example configuration +==== Example configuration The following example shows a basic configuration for the `list_max_depth` option, which limits list indentation to a maximum of 2 levels: