function createDescription(body) {
//alert(body);
//alert(myEditor.document.getBody().getText());
return;
var start = body.indexOf('<table');
while (start != -1) {
var end = body.indexOf('</table>');
body = body.substring(0, start) + body.substring(end + 8, body.length);
start = body.indexOf('<table');
}
body = body.replace(/<\/?[^>]*>/g, ''); // 去除HTML tag
body = body.replace(/[ | ]*\n/g, '\n'); // 去除行尾空白
body = body.replace(/\n[\s| | ]*\r/g, '\n'); // 去除多余空行
body = body.replace(/ /ig, '');// 去掉
return body;
}
去除一些html标签
最新推荐文章于 2024-01-24 15:30:50 发布