-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest9.html
45 lines (38 loc) · 7.18 KB
/
test9.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="js/jquery-2.1.1.js"></script>
<script>
/* var yy =
"<table class=\"table table-striped table-bordered\"><tbody><tr><td>学管督导相关</td><td></td><td></td><td></td></tr><tr><td>部门</td><td>项目</td><td>具体支持内容</td><td>联系人</td></tr><tr><td rowspan=\"8\" >学管督导部<br /><a href=\"#\" data-user=\"duhy\">杜海云</a><br /> <a href=\"mailto:[email protected]\">[email protected]</a></td><td rowspan=\"2\" >学管政策</td><td>学管业务规范的制定与发布</td><td rowspan=\"2\" ><a href=\"#\" data-user=\"duhy\">杜海云</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>学管相关管理规定、政策咨询</td></tr><tr><td rowspan=\"2\" >学管培训</td><td>学管业务培训</td><td rowspan=\"2\" ><a href=\"#\" data-user=\"duhy\">杜海云</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>区域培训业务支持</td></tr><tr><td rowspan=\"4\" >学管督导业务支持</td><td rowspan=\"4\" >续费、口碑、课耗、退费相关业务(方案、工具、话术)及区域业务对接与支持</td><td>首都/重庆/成都 <a href=\"#\" data-user=\"g-lanyy\">兰媛媛</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>东北/莞惠珠/黔贵海/三江 <a href=\"#\" data-user=\"houpengwei\">侯鹏威</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>湖南/闽浙赣/山东/湖北 <a href=\"#\" data-user=\"g-liusx\">刘水仙</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>直辖/华北/江苏/上海 <a href=\"#\" data-user=\"fanmeng\">范萌</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr></tbody></table><table class=\"table table-striped table-bordered\"><tbody><tr><td>运营督导相关</td><td></td><td></td><td></td></tr><tr><td>部门</td><td>项目</td><td>具体支持内容</td><td>联系人</td></tr><tr><td rowspan=\"9\" >运营督导部<br /><a href=\"#\" data-user=\"dingln\">丁龙女</a><br /> <a href=\"mailto:[email protected]\">[email protected]</a></td><td>运营支持</td><td>校区运营支持、新校区开业支持</td><td><a href=\"#\" data-user=\"dingln\">丁龙女</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>转学转量</td><td>转学转量规则方法支持</td><td><a href=\"#\" data-user=\"dingln\">丁龙女</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td rowspan=\"2\" >贷款分期</td><td>新开账号</td><td rowspan=\"2\" ><a href=\"#\" data-user=\"g-wangtt\">王婷婷</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>退费、退利息、贷款方法</td></tr><tr><td>教学支持</td><td>属地讲师带教/驻地教学支持</td><td><a href=\"#\" data-user=\"dingln\">丁龙女</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>运营质控</td><td>400客服与投诉、退费回访、满意度回访、线上客服、其他客户意见反馈接待</td><td><a href=\"#\" data-user=\"zhangky2\">张凯跃</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>运营合规</td><td>与运营合规及管理制度相关的对接,文档解密申请</td><td><a href=\"#\" data-user=\"liyue3\">李玥</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>教具</td><td>教具管理采购</td><td rowspan=\"2\" ><a href=\"#\" data-user=\"zhouyl\">周亚俐</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>内购商城</td><td>平台账号、流程操作、售后问题解决;礼品采购品类、价格建议、供应商推荐</td></tr></tbody></table><table class=\"table table-striped table-bordered\"><tbody><tr><td>教学教研相关</td><td></td><td></td><td></td></tr><tr><td>部门</td><td>项目</td><td>具体支持内容</td><td>联系人</td></tr><tr><td rowspan=\"7\" >童程教研部<br /><a href=\"#\" data-user=\"shiyl\">石远丽</a><br /> <a href=\"mailto:[email protected]\">[email protected]</a></td><td rowspan=\"6\" >童程教学</td><td>童程教学相关咨询</td><td rowspan=\"4\" ><a href=\"#\" data-user=\"wangml\">汪美灵</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>全国讲师培训</td></tr><tr><td>全国教学经理培训</td></tr><tr><td>全国教学督导</td></tr><tr><td>NOIP课程相关</td><td><a href=\"#\" data-user=\"maqiang\">马强</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>童程在线教学相关</td><td><a href=\"#\" data-user=\"zhanghao\">张昊</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>语数思维课教学</td><td>语数思维课教学相关</td><td><a href=\"#\" data-user=\"shenleitao\">申雷涛</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td rowspan=\"5\" >童创教研部<br /><a href=\"#\" data-user=\"sunsm\">孙善明</a><br /> <a href=\"mailto:[email protected]\">[email protected]</a></td><td rowspan=\"5\" >童创教学</td><td>童创课程及教学相关咨询</td><td rowspan=\"3\" ><a href=\"#\" data-user=\"yiyh\">易艳红</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>全国教学督导</td></tr><tr><td>全国教学经理培训</td></tr><tr><td>全国讲师培训</td><td><a href=\"#\" data-user=\"lisw\">李松韪</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>机器人大赛相关技术咨询</td><td><a href=\"#\" data-user=\"wangguo\">王国</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr><tr><td>童慧教研部<br /><a href=\"#\" data-user=\"guodh\">郭镫鸿</a><br /> <a href=\"mailto:[email protected]\">[email protected]</a></td><td>童星计划</td><td>童星计划教学研发相关咨询</td><td><a href=\"#\" data-user=\"guodh\">郭镫鸿</a> <a href=\"mailto:[email protected]\">[email protected]</a></td></tr></tbody></table>";
*/
var a = CKEDITOR.instances['t_cke_01'];
var t1 = a.getData();
var yy = t1.replace(/style="[^"]*"/gi,'').replace(/(<\/?a.*?>)|(<\/?span.*?>)/gi,'')
.replace(/<table[^>]*>/gi,'<table class="table table-striped table-bordered">').replace(/ /gi,'')
.replace(/([\u2E80-\u9FFF]+)(<br \/>)?\s*(([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6}))/gi,'<a href="#" data-user="$4">$1</a>$2 <a href="mailto:$3">$3</a>')
.replace(/<td >/g,'<td>').replace(/[\n\t]/g,'').replace(/(<\/?strong>)/g,'')
.replace(/<tr>(<td><\/td>){4}<\/tr>/gi,'</tbody></table><table class="table table-striped table-bordered"><tbody>');
var $html = $('<div>' + yy + '</div>');
$html.find('table').each(function(i, table) {
var $table = $(table);
var $h_ = $('<thead></thead>');
var $tr1 = $table.find('tr').eq(0);
var $tr2 = $table.find('tr').eq(1);
$tr1.addClass('bg-primary cus-p').find('td:gt(0)').remove();
$tr1.children().attr('colspan', '4');
$tr2.addClass('bg-primary');
$h_.append($tr1);
$h_.append($tr2);
$table.prepend($h_);
$table.wrap('<div class="table-responsive"></div>');
});
a.setData($html.html());
console.log('--', $html.html());
</script>
</body>
</html>