|
1 | | - |
2 | 1 | = {productname} {release-version} |
3 | 2 | :release-version: 8.0.0 |
4 | 3 | :navtitle: {productname} {release-version} |
@@ -104,6 +103,34 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a |
104 | 103 |
|
105 | 104 | // CCFR here. |
106 | 105 |
|
| 106 | +=== New `list_max_depth` option to limit list indentation |
| 107 | +// #TINY-11937 |
| 108 | + |
| 109 | +{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. |
| 110 | + |
| 111 | +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. |
| 112 | + |
| 113 | +Outdent functionality remains unaffected and always available. The state of indent and outdent controls reflects the current indentation capabilities based on this setting. |
| 114 | + |
| 115 | +.Example configuration |
| 116 | + |
| 117 | +The following example shows a basic configuration for the `list_max_depth` option, which limits list indentation to a maximum of 2 levels: |
| 118 | + |
| 119 | +[source,js] |
| 120 | +---- |
| 121 | +tinymce.init({ |
| 122 | + selector: "textarea", |
| 123 | + plugins: [ |
| 124 | + "advlist", "anchor", "autolink", "charmap", "code", "fullscreen", |
| 125 | + "help", "image", "insertdatetime", "link", "lists", "media", |
| 126 | + "preview", "searchreplace", "table", "visualblocks", |
| 127 | + ], |
| 128 | + list_max_depth: 2, |
| 129 | + toolbar: "undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", |
| 130 | +}); |
| 131 | +---- |
| 132 | + |
| 133 | +For more information, see: xref:user-formatting-options.adoc#list_max_depth[User formatting - List max depth]. |
107 | 134 |
|
108 | 135 | [[additions]] |
109 | 136 | == Additions |
|
0 commit comments