GeneralUtility is a package library in TYPO3 CMS that provides a set of utility functions for common tasks. One of its functions is formatForTextarea, which is used to format text for display in a textarea field.
Examples:
1. Formatting a plain string for use in a textarea:
$plainText = "This is some plain text."; $formattedText = \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($plainText);
This code takes a simple string of text and formats it in a way that is safe and easy to display in a textarea field.
This code takes HTML code and formats it so that it can be safely displayed in a textarea. The second parameter indicates that the input is HTML code and should be converted to plain text.
PHP TYPO3\CMS\Core\Utility GeneralUtility::formatForTextarea - 21 examples found. These are the top rated real world PHP examples of TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea extracted from open source projects. You can rate examples to help us improve the quality of examples.