Repository: pimcore/pimcore (language: php)

Issue:
[Docs] Add note to the docs for: Pimcore 11 TinyMCE Default Config truncating content
Add notes to the docs as discussed here: https://github.com/pimcore/pimcore/discussions/16414#discussioncomment-8008499



### Discussed in https://github.com/pimcore/pimcore/discussions/16414

<div type='discussions-op-text'>

<sup>Originally posted by **mlkdev** January  4, 2024</sup>
Pimcore Version 11.0.12

We have a DataObject class we're using for Articles and other publications, and for the most part it works as expected. However, we recently encountered an instance where text is being truncated without apparent reason.

We've tested to make sure it's not an issue with the database, and we were able to insert our markup directly into the database, flushed the caches and it output as expected. However, using the Pimcore UI, and the out-of-the-box config for TinyMCE, it appears that the content is being truncated before being saved.

We also followed various guides online that instruct how to remove the character limit using the following markup:
```
{
  selector: 'textarea',
  max_chars: -1
}
```
This appears to not have any affect on storage process, and still results in truncation of content. It appears to truncate around 20,000 characters. I just tried storing a block of Lorem Ipsum with no markup, and it concatenated at exactly 20,000 characters.

Anyone have any ideas?</div>


Discussion / hints:

Fix patch:
diff --git a/doc/03_Documents/01_Editables/40_WYSIWYG.md b/doc/03_Documents/01_Editables/40_WYSIWYG.md
index ef41a0c17f8..1bec989fd4c 100644
--- a/doc/03_Documents/01_Editables/40_WYSIWYG.md
+++ b/doc/03_Documents/01_Editables/40_WYSIWYG.md
@@ -56,3 +56,5 @@ If you want to adapt this configuration please have a look at the [symfony docum
 
 > Note: When using API to set WYSIWYG data, please pass encoded characters for html entities e.g. `<`,`>`, `&` etc.
 > The data is encoded by the sanitizer before persisting into db and the same encoded data will be returned by the API.
+
+> Note: By default, HTML sanitizer truncates content at 20.000 characters. To change that, see [symfony documentation](https://symfony.com/doc/current/html_sanitizer.html#max-input-length). 
diff --git a/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md b/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
index c8d2d4a3c6b..7d703b584f4 100644
--- a/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
+++ b/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
@@ -175,7 +175,7 @@ The tokens for password reset are now stored in the DB and are one time use only
 -  Enabled Content Security Policy by default.
 -  Implemented Symfony HTML sanitizer for WYSIWYG editors. Please make sure to sanitize your persisted data with help of this [script](https://gist.github.com/dvesh3/0e585a16dfbf546bc17a9eef1c5640b3).
 Also, when using API to set WYSIWYG data, please pass encoded characters for html entities `<`,`>`, `&` etc.
-The data is encoded by the sanitizer before persisting into db and the same encoded data will be returned by the API.
+The data is encoded by the sanitizer before persisting into db and the same encoded data will be returned by the API. For configuration details see also [WYSIWYG config](../../03_Documents/01_Editables/40_WYSIWYG.md#extending-symfony-html-sanitizer-configuration)
 
 
 -----------------


Test patch: