使用百度编辑器,要想把里面的第一张图变成缩略图放到首页显示,第一张图与其他图都还要在详细页面显示,故尺寸不变。
其内容例如:
<p>物品尺寸/规格:高24厘米,,好东西值得收藏。</p><p><img src="/ueditor/php/../../data/attachment/antique//20141123/14167157082579.jpg" style="max-width:700px;width:expression(this.width > 700? 700: true);" title="1.jpg"/></p><p><img src="/ueditor/php/../../data/attachment/antique//20141123/14167157109272.jpg" style="max-width:700px;width:expression(this.width > 700? 700: true);" title="2.jpg"/></p><p><img src="/ueditor/php/../../data/attachment/antique//20141123/14167157112075.jpg" style="max-width:700px;width:expression(this.width > 700? 700: true);" title="3.jpg"/></p><p><br/></p>
现在我要把第一张图data/attachment/antique//20141123/14167157082579.jpg作为缩略图放在首页显示,怎么实现?
------解决思路----------------------
正则匹配出内容放上去
------解决思路----------------------
正则取出来,生成不同名称的缩略图,入库,显示
------解决思路----------------------
建议另设置一个字段,单独保存这个图片地址
------解决思路----------------------
你要在编辑器的上传代码的地方修改