I am using in place ckeditor with jquery drag and drop. I want to limit the number of characters to 20 and put the read more link. Can anyone tel me, how can i do this.
Asked
Active
Viewed 2,468 times
2
-
Covered in this quesiton: https://stackoverflow.com/questions/965235/how-can-i-truncate-a-string-in-php – jefflunt Jun 13 '11 at 15:13
1 Answers
2
Not sure if this will work inside your editor but does limit the characters when displayed on html page on frontend:
<html>
<body>
<?PHP
$chars = 20;
$desc = substr($ckeditorcontent,0,$chars);
echo $desc ."...";?><a href="#" title="More info">More</a>
</body>
</html>

sloga
- 612
- 2
- 12
- 31