1) Download and install PHx
2) Go to Elements > Manage Elements > Snippets > New Snippet, and add the following:
Snippet name: phx:character_limit
Snippet code (php):
<?php
if (strlen($output) > $options) {
$output_cutted = substr($output, 0, $options);
$last_space = strrpos($output_cutted, " ");
$output = substr($output_cutted, 0, $last_space) . "";
}
return $output;
?>
3) Save and Close the Snippet
4) Go to your Ditto template and add something like this:
<p>[+introtext:character_limit=`360`+]</p>
As you can see the original Placeholder was [+introtext+], so I’ve just added this code ":character_limit=`360`" inside.