织梦kindeditor编辑器图片上传增加图片说明alt属性和title属性效果图:
1 | 在织梦/include/kindeditor/kindeditor-all.js 或者 /kindeditor/kindeditor.js 或者 /kindeditor/kindeditor-min.js 找到图片按钮的代码
‘
‘,
在里面加入
‘
‘,
‘‘,
”,
‘ 使用文章标题’,
‘
‘,
2 | kindeditor_post.php 或者 kindeditor\php\upload_json.php 找到
echo $json->encode(array(‘error’ => 0, ‘url’ =>
改成
$img_title = $_POST[‘title’];
echo $json->encode(array(‘error’ => 0, ‘url’ => $activepath.”/$mdir/”.$filename_name, ‘title’=>$img_title));
就是加了 img_title 而已,注意你的代码,不一定跟上面的是一样的。在你的基础上加入而已。