1、在wangEditor.js中——
——添加
<span style="float:left;font-size:14px;margin:4px 5px 0 5px;color:#333;">\u81ea\u5b9a\u4e49\u5bbd\u5ea6</span><input id="selfSize" class="left" size="5" maxlength="3"/>%\n
2、后面设置
{
selector: \'#selfSize\',
type: \'input\',
fn: function fn() {
var $img = editor._selectedImg;
if ($img) {
var size = $("#selfSize").val();
$img.css(\'max-width\', size + \'%\');
}
// 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭
//return true;
}
即可