限制字符数并放入阅读更多链接 [英] Limit number of characters and put read more link

查看:87
本文介绍了限制字符数并放入阅读更多链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ckeditor和jquery拖放。
我想将字符数限制为20并将读取更多链接。
任何人都可以给我打电话,我该怎么做。

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.

推荐答案

不确定这是否适用于您的编辑器但是在前端的html页面上显示时限制字符:

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>

这篇关于限制字符数并放入阅读更多链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆