N°5298 - Upgrade CKEditor to version 5

- correct textarea encoding for ckeditor
https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/getting-and-setting-data.html#automatic-integration-with-html-forms
This commit is contained in:
Benjamin Dalsass
2024-06-10 10:07:20 +02:00
parent cd065cc0db
commit 6080e456c5
5 changed files with 23 additions and 7 deletions

View File

@@ -115,6 +115,19 @@ class CKEditorHelper
return $aMentionConfiguration;
}
/**
* Encode value when using CKEditor with a TextArea.
* @see https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/getting-and-setting-data.html#automatic-integration-with-html-forms
*
* @param string $sValue
*
* @return string
*/
public static function PrepareCKEditorValueTextEncodingForTextarea(string $sValue) : string
{
return str_replace( '&', '&', $sValue );
}
/**
* Configure CKEditor element (WebPage).
*