function temp(para,type){//para为后端传来的背景信纸与样式,type为写信还是回信,后端为C++
var allInfo = ue.body.innerHTML;
if(type != 0)
{
var strStartoneIndex = allInfo.indexOf('>');
var strStartIndex = allInfo.indexOf('</div>');
var userInputInfo = allInfo.substring(strStartoneIndex+1, strStartIndex);
var strEndIndex = allInfo.length;
var oldInfo = allInfo.substring(strStartIndex+6, strEndIndex);
var newInputInfo = "<div id='signString' style=\""+para+"\">"+userInputInfo+"</div>";
ue.setContent(newInputInfo);
ue.setContent(oldInfo, true);
}
else
{
var strStartIndex = allInfo.indexOf('>');
var strEndIndex = allInfo.indexOf('</div>');
var html = allInfo.substring(strStartIndex+1, strEndIndex);
var outWrap = "<div id='signString' style=\""+para+"\">"+html+"</div>";
ue.setContent(outWrap);
}
}
//这样写背景信纸基本完成,但是回车以后会重复在编辑器里面再添加一次信纸所以…在ueditor.all.js,里面注掉 enterTag: ‘p’,就可以了