var txt = layedit.getContent(ieditor);//获取编辑器内的文本var regex = new RegExp('<img', 'gi');txt = txt.replace(regex, '<img style=" 100%;"');$("#detail").val(txt);