PHP code example of webcoast / character-counter
1. Go to this page and download the library: Download webcoast/character-counter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webcoast / character-counter example snippets
\WEBcoast\CharacterCounter\Helper\Tca::enableCharacterCounter('pages', 'seo_title', 60, 40);
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['pages']['columns']['seo_title']['config'], [
'fieldWizard' => [
'characterCount' => [
'renderType' => 'characterCountWizard'
]
],
'characterCount' => [
'warning' => 120, // Optional: Defaults to 80% of `max`
'max' => 160
]
]
);