HTML源码模式编辑下div标签自动替换成了p标签 UEueeditor 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 case 'div': if(node.getAttr('cdata_tag')){ break; } //针对代码这里不处理插入代码的div val = node.getAttr('class'); if(val && /^line number\d+/.test(val)){ break; } if(!allowDivTransToP){ break; } var tmpNode, p = UE.uNode.createElement('p'); while (tmpNode = node.firstChild()) { if (tmpNode.type == 'text' || !UE.dom.dtd.$block[tmpNode.tagName]) { p.appendChild(tmpNode); } else { if (p.firstChild()) { node.parentNode.insertBefore(p, node); p = UE.uNode.createElement('p'); } else { node.parentNode.insertBefore(tmpNode, node); } } } if (p.firstChild()) { node.parentNode.insertBefore(p, node); } node.parentNode.removeChild(node); break;<div class="classname">test</div> <div class="line number11"> test</div>很坑爹的在线编辑器 样式名称都得有规定 你要么换个别的在线编辑器吧 别个之前用的,暂时不换。。参考这个暂时解决问题http://blog.csdn.net/xuemoyao/article/details/17209359 .config配置文件增加配置选项 div就可以不转化成p,allowDivTransToP:false <fieldset class="comment_quote" style="white-space: normal; margin: 0px; padding: 5px; border: 1px solid rgb(204, 204, 204); color: rgb(51, 51, 51); font-size: 14px; font-family: 宋体; widows: 2; line-height: 24px; orphans: 2; background-color: rgb(255, 255, 255);"> <legend style="margin: 0px; padding: 0px;"> <span style="margin: 0px; padding: 0px; font-family: arial, helvetica, sans-serif;"><strong style="color: rgb(102, 102, 102);"><span style="margin: 0px 8px 0px 0px; padding: 4px 10px; color: rgb(255, 255, 255); border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-color: rgb(191, 0, 0);">2、自动播放</span></strong><strong style="color: rgb(60, 117, 45);"><span style="margin: 0px; padding: 0px; color: rgb(192, 0, 0);">ID:e7weicom</span></strong></span> </legend> <p style="text-align: center;"> <span style="font-family: 微软雅黑, 'Microsoft YaHei';">http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3</span> </p> <p style="text-align: center;"> <audio src="http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3" data-ke-src="http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3" controls="controls" autoplay="autoplay" style="max-width: 100%; word-wrap: break-word !important; box-sizing: border-box !important;"></audio> </p> <p style="text-align: center;"> <br/> </p></fieldset><p style="margin: 5px 0px; color: rgb(51, 51, 51); font-family: 宋体; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-align: center;"> <br/></p> 如何修改下面这段js,从而改为可以输入负数。 jQuery或者CSS。这个问题看看有几个人知道问题出现在哪里。 请看一下我的正则表达式 下拉列控制多个文本框显示与隐藏 怎么让<span>一获得焦点就把里面的内容选中? 问个很弱的问题,求几行代码, 关于脚本中的文件对象 菜鸟问题来抢分,如何得到这个东西 again please! net_lover, please check this out. 将值传递到表单的问题?????? 启动tomcat后,在浏览器上输入http://localhost:8080/h2.js显示的是h2里面的文本内容 请教easyui的问题。
case 'div':
if(node.getAttr('cdata_tag')){
break;
}
//针对代码这里不处理插入代码的div
val = node.getAttr('class');
if(val && /^line number\d+/.test(val)){
break;
}
if(!allowDivTransToP){
break;
}
var tmpNode, p = UE.uNode.createElement('p');
while (tmpNode = node.firstChild()) {
if (tmpNode.type == 'text' || !UE.dom.dtd.$block[tmpNode.tagName]) {
p.appendChild(tmpNode);
} else {
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
p = UE.uNode.createElement('p');
} else {
node.parentNode.insertBefore(tmpNode, node);
}
}
}
if (p.firstChild()) {
node.parentNode.insertBefore(p, node);
}
node.parentNode.removeChild(node);
break;
<div class="classname">test</div>
<div class="line number11">
test
</div>很坑爹的在线编辑器 样式名称都得有规定
你要么换个别的在线编辑器吧
别个之前用的,暂时不换。。参考这个暂时解决问题http://blog.csdn.net/xuemoyao/article/details/17209359
增加配置选项 div就可以不转化成p
,allowDivTransToP:false
<legend style="margin: 0px; padding: 0px;">
<span style="margin: 0px; padding: 0px; font-family: arial, helvetica, sans-serif;"><strong style="color: rgb(102, 102, 102);"><span style="margin: 0px 8px 0px 0px; padding: 4px 10px; color: rgb(255, 255, 255); border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-color: rgb(191, 0, 0);">2、自动播放</span></strong><strong style="color: rgb(60, 117, 45);"><span style="margin: 0px; padding: 0px; color: rgb(192, 0, 0);">ID:e7weicom</span></strong></span>
</legend>
<p style="text-align: center;">
<span style="font-family: 微软雅黑, 'Microsoft YaHei';">http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3</span>
</p>
<p style="text-align: center;">
<audio src="http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3" data-ke-src="http://7sbq1u.com1.z0.glb.clouddn.com/筷子兄弟 - 小苹果.mp3" controls="controls" autoplay="autoplay" style="max-width: 100%; word-wrap: break-word !important; box-sizing: border-box !important;"></audio>
</p>
<p style="text-align: center;">
<br/>
</p>
</fieldset>
<p style="margin: 5px 0px; color: rgb(51, 51, 51); font-family: 宋体; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-align: center;">
<br/>
</p>