惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Cloudbric
Cloudbric
G
GRAHAM CLULEY
S
Securelist
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Spread Privacy
Spread Privacy
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
T
Tailwind CSS Blog
博客园_首页
有赞技术团队
有赞技术团队
Simon Willison's Weblog
Simon Willison's Weblog
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Latest news
Latest news
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
O
OpenAI News
J
Java Code Geeks
T
Tenable Blog
K
Kaspersky official blog
AWS News Blog
AWS News Blog
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
T
Threatpost
月光博客
月光博客
H
Heimdal Security Blog
Security Latest
Security Latest
The Hacker News
The Hacker News
Y
Y Combinator Blog
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
C
CERT Recently Published Vulnerability Notes
D
Docker
Google Online Security Blog
Google Online Security Blog
D
DataBreaches.Net
V
Visual Studio Blog
H
Help Net Security

博客园 - 问天何必

网文小说应该怎么从零开始设计故事情节呢? 拒绝花里胡哨,这次来真的,又做了一个导航+超级搜索, 50+功能自定义调整。 一个优秀的导航站。 1个能顶100个 Redis 挂了自动重启的shell 脚本。 宝塔linux面板, 服务器日志分析与流量统计这款插件的mysql版优化。 苹果cms自动采集,重复执行遇到“上次执行时间: --跳过”的解决办法 苹果cms, 后台设置保存不了的解决办法 c# 【电影搜索引擎】采集电影站源码 解决 C:\WINDOWS\system32\inetsrv\rewrite.dll 未能加载。返回的数据为错误. - 问天何必 安利一个聚合搜索导航站,及怎么样设置成默认的搜索引擎 img error 图片加载失败的最佳方案 百度站长平台HTTPS认证所遇到的坑 百度Sitemap生成器 女朋友经常问影视剧, 答不上来怎么办? fiddler抓取手机上https数据配置和失败的解决办法 STSDB 一 windows2012 IIS部署GeoTrust证书踩过的坑。 jquery ajax GET POST 跨域请求实现 代码记录:使用Aforge.net让视频图像反转180度
百度编辑器解决span被过滤, 自动加P标签
问天何必 · 2016-04-14 · via 博客园 - 问天何必
editor_all.js:

自动加P标签去除:

改成: enterTag: '',

span被过滤:

  //从编辑器出去的内容处理
    me.addOutputRule(function (root) {
 
        var val;
        root.traversal(function (node) {
            if (node.type == 'element') {
 
               // if (me.options.autoClearEmptyNode && dtd.$inline[node.tagName] && !dtd.$empty[node.tagName] && (!node.attrs || utils.isEmptyObject(node.attrs))) {
 
                //    if (!node.firstChild()) node.parentNode.removeChild(node);
                //    else if (node.tagName == 'span' && (!node.attrs || utils.isEmptyObject(node.attrs))) {
                   //     node.parentNode.removeChild(node, true)
                  //  }
                  //  return;
              //  }

以上的内容注释掉. 

再删除switch中关于span的处理判断. 

posted @ 2016-04-14 15:21  问天何必  阅读(5889)  评论()    收藏  举报