﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; kindeditor</title>
	<atom:link href="https://www.softwareace.cn/?feed=rss2&#038;tag=kindeditor" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>KindEditor/初始化参数</title>
		<link>https://www.softwareace.cn/?p=1109</link>
		<comments>https://www.softwareace.cn/?p=1109#comments</comments>
		<pubDate>Wed, 14 Jan 2015 03:49:09 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[kindeditor]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1109</guid>
		<description><![CDATA[KindEditor &#124; 使用方法 &#124; 初始化参数&#124;添加自定义插件&#124;API文档&#124;常见问题 width 编辑器的 [&#8230;]]]></description>
				<content:encoded><![CDATA[<table style="color: #000000;">
<tbody>
<tr>
<td><b><a style="color: #0b0080;" title="KindEditor" href="http://www.zzbaike.com/wiki/KindEditor">KindEditor</a></b> | <b><a style="color: #0b0080;" title="KindEditor/使用方法" href="http://www.zzbaike.com/wiki/KindEditor/%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95">使用方法</a></b> | <b>初始化参数</b>|<b><a style="color: #0b0080;" title="KindEditor/添加自定义插件" href="http://www.zzbaike.com/wiki/KindEditor/%E6%B7%BB%E5%8A%A0%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8F%92%E4%BB%B6">添加自定义插件</a></b>|<b><a style="color: #0b0080;" title="KindEditor/API文档" href="http://www.zzbaike.com/wiki/KindEditor/API%E6%96%87%E6%A1%A3">API文档</a></b>|<b><a style="color: #0b0080;" title="KindEditor/常见问题" href="http://www.zzbaike.com/wiki/KindEditor/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98">常见问题</a></b></td>
</tr>
</tbody>
</table>
<table style="color: #474747;">
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
<ul style="color: #474747;">
<li><b>width</b></li>
</ul>
<p style="color: #474747;"><a style="color: #0b0080;" title="编辑器" href="http://www.zzbaike.com/wiki/%E7%BC%96%E8%BE%91%E5%99%A8">编辑器</a>的宽度，可以设置px或%，比textarea输入框样式表宽度优先度高。</p>
<p style="color: #474747;">数据类型: String； 默认值: textarea输入框的宽度</p>
<p style="color: #474747;">示例:</p>
<p></p><pre class="crayon-plain-tag">K.create('#id', {
        width&nbsp;: '700px'
});</pre><p></p>
<ul style="color: #474747;">
<li><b>height</b></li>
</ul>
<p style="color: #474747;">编辑器的高度，只能设置px，比textarea输入框样式表高度优先度高。</p>
<p style="color: #474747;">数据类型: String； 默认值: textarea输入框的高度</p>
<ul style="color: #474747;">
<li><b>minWidth</b></li>
</ul>
<p style="color: #474747;">指定编辑器最小宽度，单位为px。</p>
<p style="color: #474747;">数据类型: Int； 默认值: 650</p>
<ul style="color: #474747;">
<li><b>items</b></li>
</ul>
<p style="color: #474747;">配置编辑器的工具栏，其中”/”表示换行，”|”表示分隔符。</p>
<p style="color: #474747;">数据类型: Array；</p>
<p style="color: #474747;">默认值:</p>
<p></p><pre class="crayon-plain-tag">[
        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'map', 'code', 'pagebreak',
        'link', 'unlink', '|', 'about'
]</pre><p></p>
<ul style="color: #474747;">
<li><b>noDisableItems</b></li>
</ul>
<p style="color: #474747;">designMode 为false时，要保留的工具栏图标。</p>
<p style="color: #474747;">数据类型: Array； 默认值: [‘source’, ‘fullscreen’]</p>
<ul style="color: #474747;">
<li><b>filterMode</b></li>
</ul>
<p style="color: #474747;">true时过滤<a style="color: #0b0080;" title="HTML" href="http://www.zzbaike.com/wiki/HTML">HTML</a><a class="mw-redirect" style="color: #0b0080;" title="代码" href="http://www.zzbaike.com/wiki/%E4%BB%A3%E7%A0%81">代码</a>，false时允许输入任何代码。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: false</p>
<ul style="color: #474747;">
<li><b>htmlTags</b></li>
</ul>
<p style="color: #474747;">指定要保留的HTML标记和属性。Object的key为HTML<a class="mw-redirect" style="color: #0b0080;" title="标签" href="http://www.zzbaike.com/wiki/%E6%A0%87%E7%AD%BE">标签</a>名，value为HTML属性数组，”.”开始的属性表示style属性。</p>
<p style="color: #474747;">数据类型: Object； 默认值:</p>
<p></p><pre class="crayon-plain-tag">{
        font&nbsp;: ['color', 'size', 'face', '.background-color'],
        span&nbsp;: [
                '.color', '.background-color', '.font-size', '.font-family', '.background',
                '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height'
        ],
        div&nbsp;: [
                'align', '.border', '.margin', '.padding', '.text-align', '.color',
                '.background-color', '.font-size', '.font-family', '.font-weight', '.background',
                '.font-style', '.text-decoration', '.vertical-align', '.margin-left'
        ],
        table: [
                'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor',
                '.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color',
                '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background',
                '.width', '.height'
        ],
        'td,th': [
                'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
                '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
                '.font-style', '.text-decoration', '.vertical-align', '.background'
        ],
        a&nbsp;: ['href', 'target', 'name'],
        embed&nbsp;: ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
        img&nbsp;: ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
        'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6'&nbsp;: [
                'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
                '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
        ],
        pre&nbsp;: ['class'],
        'hr,br,tbody,tr,strong,b,sub,sup,em,i,u,strike'&nbsp;: []
}</pre><p></p>
<ul style="color: #474747;">
<li><b>wellFormatMode</b></li>
</ul>
<p style="color: #474747;">true时美化HTML数据。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>resizeType</b></li>
</ul>
<p style="color: #474747;">2或1或0，2时可以拖动改变宽度和高度，1时只能改变高度，0时不能拖动。</p>
<p style="color: #474747;">数据类型: Int； 默认值: 2</p>
<ul style="color: #474747;">
<li><b>themeType</b></li>
</ul>
<p style="color: #474747;">指定主题风格，可设置”default”、”simple”，指定simple时需要引入simple.css。</p>
<p style="color: #474747;">数据类型: String； 默认值: “default”</p>
<p style="color: #474747;">示例:</p>
<p></p><pre class="crayon-plain-tag">&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/default/default.css&quot; /&amp;gt;
&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/simple/simple.css&quot; /&amp;gt;
&amp;lt;script charset=&quot;utf-8&quot; src=&quot;../kindeditor.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script charset=&quot;utf-8&quot; src=&quot;../lang/zh_CN.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
        var editor;
        KindEditor.ready(function(K) {
                editor = K.create('#editor_id', {
                        themeType&nbsp;: 'simple'
                });
        });
&amp;lt;/script&amp;gt;</pre><p></p>
<ul style="color: #474747;">
<li><b>langType</b></li>
</ul>
<p style="color: #474747;">指定语言，可设置”en”、”zh_CN”，需要引入lang/[langType].js。</p>
<p style="color: #474747;">数据类型: String； 默认值: “zh_CN”</p>
<p style="color: #474747;">示例:</p>
<p></p><pre class="crayon-plain-tag">&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/default/default.css&quot; /&amp;gt;
&amp;lt;script charset=&quot;utf-8&quot; src=&quot;../kindeditor.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script charset=&quot;utf-8&quot; src=&quot;../lang/en.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
        var editor;
        KindEditor.ready(function(K) {
                editor = K.create('#editor_id', {
                        langType&nbsp;: 'en'
                });
        });
&amp;lt;/script&amp;gt;</pre><p></p>
<ul style="color: #474747;">
<li><b>designMode</b></li>
</ul>
<p style="color: #474747;">可视化模式或代码模式</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>fullscreenMode</b></li>
</ul>
<p style="color: #474747;">true时加载编辑器后变成全屏模式。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: false</p>
<ul style="color: #474747;">
<li><b>basePath</b></li>
</ul>
<p style="color: #474747;">指定编辑器的根目录路径。</p>
<p style="color: #474747;">数据类型: String； 默认值: 根据kindeditor.js文件名自动获取</p>
<ul style="color: #474747;">
<li><b>themesPath</b></li>
</ul>
<p style="color: #474747;">指定编辑器的themes目录路径。</p>
<p style="color: #474747;">数据类型: String； 默认值: basePath + ‘themes/’</p>
<ul style="color: #474747;">
<li><b>pluginsPath</b></li>
</ul>
<p style="color: #474747;">指定编辑器的plugins目录路径。</p>
<p style="color: #474747;">数据类型: String； 默认值: basePath + ‘plugins/’</p>
<ul style="color: #474747;">
<li><b>langPath</b></li>
</ul>
<p style="color: #474747;">指定编辑器的lang目录路径。</p>
<p style="color: #474747;">数据类型: String； 默认值: basePath + ‘lang/’</p>
<ul style="color: #474747;">
<li><b>minChangeSize</b></li>
</ul>
<p style="color: #474747;">undo/redo文字输入最小变化长度，当输入的文字变化小于这个长度时不会添加到undo记录里。</p>
<p style="color: #474747;">数据类型: String； 默认值: 5</p>
<ul style="color: #474747;">
<li><b>urlType</b></li>
</ul>
<p style="color: #474747;">改变站内本地<a class="mw-redirect" style="color: #0b0080;" title="URL" href="http://www.zzbaike.com/wiki/URL">URL</a>，可设置”“、”relative”、”absolute”、”domain”。空为不修改URL，relative为相对路径，absolute为绝对路径，domain为带域名的绝对路径。</p>
<p style="color: #474747;">数据类型: String； 默认值: “”</p>
<ul style="color: #474747;">
<li><b>newlineTag</b></li>
</ul>
<p style="color: #474747;">设置回车换行标签，可设置”p”、”br”。</p>
<p style="color: #474747;">数据类型: String； 默认值: “p”</p>
<ul style="color: #474747;">
<li><b>pasteType</b></li>
</ul>
<p style="color: #474747;">设置粘贴类型，0:禁止粘贴, 1:纯文本粘贴, 2:HTML粘贴</p>
<p style="color: #474747;">数据类型: Int； 默认值: 2</p>
<ul style="color: #474747;">
<li><b>dialogAlignType</b></li>
</ul>
<p style="color: #474747;">设置弹出框(dialog)的对齐类型，可设置”“、”page”，指定page时按当前页面居中，指定空时按编辑器居中。</p>
<p style="color: #474747;">数据类型: String； 默认值: “page”</p>
<ul style="color: #474747;">
<li><b>shadowMode</b></li>
</ul>
<p style="color: #474747;">true时弹出层(dialog)显示阴影。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>useContextmenu</b></li>
</ul>
<p style="color: #474747;">true时使用右键菜单，false时屏蔽右键菜单。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>syncType</b></li>
</ul>
<p style="color: #474747;">同步数据的方式，可设置”“、”form”，值为form时提交form时自动同步，空时不会自动同步。</p>
<p style="color: #474747;">数据类型: String； 默认值: “form”</p>
<ul style="color: #474747;">
<li><b>indentChar</b></li>
</ul>
<p style="color: #474747;">wellFormatMode 为true时，HTML代码缩进字符。</p>
<p style="color: #474747;">数据类型: String； 默认值: “\t”</p>
<ul style="color: #474747;">
<li><b>cssPath</b></li>
</ul>
<p style="color: #474747;">指定编辑器iframe document的<a style="color: #0b0080;" title="CSS" href="http://www.zzbaike.com/wiki/CSS">CSS</a>文件，用于设置可视化区域的样式。</p>
<p style="color: #474747;">数据类型: String或Array； 默认值: 空</p>
<ul style="color: #474747;">
<li><b>cssData</b></li>
</ul>
<p style="color: #474747;">指定编辑器iframe document的CSS数据，用于设置可视化区域的样式。</p>
<p style="color: #474747;">数据类型: String； 默认值: 空</p>
<ul style="color: #474747;">
<li><b>bodyClass</b></li>
</ul>
<p style="color: #474747;">指定编辑器iframe document body的className。</p>
<p style="color: #474747;">数据类型: String； 默认值: “ke-content”</p>
<ul style="color: #474747;">
<li><b>colorTable</b></li>
</ul>
<p style="color: #474747;">指定取色器里的颜色。</p>
<p style="color: #474747;">数据类型: Array； 默认值:</p>
<p></p><pre class="crayon-plain-tag">[
        ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'],
        ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'],
        ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],
        ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']
]</pre><p></p>
<ul style="color: #474747;">
<li><b>afterCreate</b></li>
</ul>
<p style="color: #474747;">设置编辑器创建后执行的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 无</p>
<ul style="color: #474747;">
<li><b>afterChange</b></li>
</ul>
<p style="color: #474747;">编辑器内容发生变化后执行的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 无</p>
<ul style="color: #474747;">
<li><b>afterTab</b></li>
</ul>
<p style="color: #474747;">按下TAB键后执行的的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 插入4个空格的函数</p>
<ul style="color: #474747;">
<li><b>afterFocus</b></li>
</ul>
<p style="color: #474747;">编辑器聚焦(focus)时执行的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 无</p>
<ul style="color: #474747;">
<li><b>afterBlur</b></li>
</ul>
<p style="color: #474747;">编辑器失去焦点(blur)时执行的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 无</p>
<ul style="color: #474747;">
<li><b>afterUpload</b></li>
</ul>
<p style="color: #474747;">上传文件后执行的回调函数。</p>
<p style="color: #474747;">数据类型: Function； 默认值: 无</p>
<p></p><pre class="crayon-plain-tag">KindEditor.ready(function(K) {
        K.create('#id', {
                afterUpload&nbsp;: function(url) {
                        alert(url);
                }
        });
});</pre><p></p>
<ul style="color: #474747;">
<li><b>uploadJson</b></li>
</ul>
<p style="color: #474747;">指定上传文件的<a class="mw-redirect" style="color: #0b0080;" title="服务器端" href="http://www.zzbaike.com/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AB%AF">服务器端</a>程序。</p>
<p style="color: #474747;">数据类型: String； 默认值: basePath + ‘php/upload_json.php’</p>
<ul style="color: #474747;">
<li><b>fileManagerJson</b></li>
</ul>
<p style="color: #474747;">指定浏览远程图片的服务器端程序。</p>
<p style="color: #474747;">数据类型: String； 默认值: basePath + ‘php/file_manager_json.php’</p>
<ul style="color: #474747;">
<li><b>allowPreviewEmoticons</b></li>
</ul>
<p style="color: #474747;">true时鼠标放在表情上可以预览表情。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>allowImageUpload</b></li>
</ul>
<p style="color: #474747;">true时显示图片上传按钮。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>allowFlashUpload</b></li>
</ul>
<p style="color: #474747;">true时显示<a style="color: #0b0080;" title="Flash" href="http://www.zzbaike.com/wiki/Flash">Flash</a>上传按钮。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>allowMediaUpload</b></li>
</ul>
<p style="color: #474747;">true时显示视音频上传按钮。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: true</p>
<ul style="color: #474747;">
<li><b>allowFileManager</b></li>
</ul>
<p style="color: #474747;">true时显示浏览远程<a style="color: #0b0080;" title="服务器" href="http://www.zzbaike.com/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8">服务器</a>按钮。</p>
<p style="color: #474747;">数据类型: Boolean； 默认值: false</p>
<ul style="color: #474747;">
<li><b>fontSizeTable</b></li>
</ul>
<p style="color: #474747;">指定文字大小。</p>
<p style="color: #474747;">数据类型: Array； 默认值:</p>
<p></p><pre class="crayon-plain-tag">['9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px']</pre><p></p>
<h2 style="color: black;"><span id=".E5.8F.82.E8.80.83.E6.9D.A5.E6.BA.90" class="mw-headline">参考来源</span></h2>
<ul style="color: #474747;">
<li>http://www.zzbaike.com/wiki/KindEditor/%E5%88%9D%E5%A7%8B%E5%8C%96%E5%8F%82%E6%95%B0</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kindeditor 粘贴网络图片保存到服务器</title>
		<link>https://www.softwareace.cn/?p=1100</link>
		<comments>https://www.softwareace.cn/?p=1100#comments</comments>
		<pubDate>Thu, 08 Jan 2015 05:05:36 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[kindeditor]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1100</guid>
		<description><![CDATA[人老了，记忆也衰退了。写代码时，只有思路，具体写起来确总忘这忘那。还有的特性或功能，脑子里朦胧记得曾经看到过或 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>人老了，记忆也衰退了。写代码时，只有思路，具体写起来确总忘这忘那。还有的特性或功能，脑子里朦胧记得曾经看到过或曾经写过却总也记不起来。在网 上找好多人的文章也就是转载别人，而图片因原作者空间失效而失效。于是想在自己blog 在转载好文章备份时，能顺便把里面图片也保存到自己服务器上。</p>
<p>由于对javascript 的了解不够深入，要在一个完全陌生的编辑器上做插件还真有点困难，加上php 也不是常用，边学边做发了三天终于将这样一个 粘贴网络图片保存到服务器 小插件做成功了。</p>
<p>贴出部分代码：</p><pre class="crayon-plain-tag">// 图片另存到服务器
		editor.addContextmenu({
	        title : '另存到服务器',
	        click : function() {
	         var img = getImageFromRange(editor.edit.cmd.range, function(img) {
	        	 	return !/^ke-\w+$/i.test(img[0].className);
	         	});
	         var imgsrc = img.attr('src');
	         K.ajax('./editor/php/saveToServer.php', function(data){var newsrc = K.formatUrl(data.url,'absolute');
	         editor.exec('insertimage', newsrc, '', '', '', '', '');
	         editor.hideMenu();} , 'POST' ,{imgurl:imgsrc});
	        },
	        cond : function() {
	        return getImageFromRange(editor.edit.cmd.range, function(img) {
	            return !/^ke-\w+$/i.test(img[0].className);
	        });
	        }
		});</pre><p>服务器端代码：</p><pre class="crayon-plain-tag">require_once 'JSON.php';
require_once '../../globals.php';
$php_path = ADMIN_ROOT . '/';
$php_url = dirname($_SERVER['PHP_SELF']) . '/../../';
$root_path = $php_path . OPTION::UPLOADFILE_PATH.'image/netimg/';
$root_url = $php_url . OPTION::UPLOADFILE_PATH.'image/netimg/';
set_time_limit(0);
$filepath=urldecode($_POST['imgurl']);
$imgArray=array('.gif','.jpg','.png','.jpeg','.bmp');
$typeArray=array();
ob_start();
$type=strrchr(trim($filepath),".");
$result = false;
if($filepath!='' &amp;&amp; in_array($type,$imgArray))
{
	$now=time();
	$filename=$now.strrchr(trim($filepath),".");
			//$filename=md5_file(trim($files[$i])).strrchr(trim($files[$i]),".");
	$ret = create_folders($root_path);
	if($ret != false){ 
		$savetime=SaveHTTPFile(trim($filepath),$root_path.$filename);
		$result = true;
	}
}
ob_end_flush();
if($result){
		header('Content-type: text/html; charset=UTF-8');
		$json = new Services_JSON();
		echo $json-&gt;encode(array('error' =&gt; 0, 'url' =&gt; $root_url.$filename));
		exit;		
}else{
		alert('创建目录失败！');
}

function getmicrotime(){
    list($usec, $sec) = explode(" ",microtime());
    return ((float)$usec + (float)$sec);
}

function SaveHTTPFile($fFileHTTPPath,$fFileSavePath)
{
	//记录程序开始的时间
	$BeginTime=getmicrotime();

	//取得文件的内容
	ob_start();
	readfile($fFileHTTPPath);
	$img = ob_get_contents();
	ob_end_clean();
	//$size = strlen($img);

	//保存到本地
	$fp2=@fopen($fFileSavePath, "a");
	fwrite($fp2,$img);
	fclose($fp2);

	//记录程序运行结束的时间
	$EndTime=getmicrotime();

	//返回运行时间
	return($EndTime-$BeginTime);
}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kindeditor编辑器高级篇：如何通过监听kindeditor编辑器的粘贴(CTRL+V)事件直接过滤掉复制内容内所有的标签包括超链接</title>
		<link>https://www.softwareace.cn/?p=1098</link>
		<comments>https://www.softwareace.cn/?p=1098#comments</comments>
		<pubDate>Wed, 07 Jan 2015 09:56:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[kindeditor]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1098</guid>
		<description><![CDATA[昨天写个一篇如何在执行一键清除HTML功能键的同时去掉kindeditor编辑器内容的所有超链接的博客，地址为 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">昨天写个一篇如何在执行一键清除HTML功能键的同时去掉kindeditor编辑器内容的所有超链接的博客，地址为：</span><a style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #3570b3; text-decoration: none; background: transparent;" href="http://www.stepday.com/topic/?688" target="_blank"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">http://www.stepday.com/topic/?688</span></a><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;"> 今天琢磨了一下是否可以更加直接地在粘贴内容至kindeditor编辑器内的时候就清楚HTML标签和去掉所有的超链接，换句话说就是只能够粘贴纯文本进入kindeditor编辑器内。</span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">通过翻看kindeditor-min.js源码文件，查找“<strong style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;">b.pasteType === 1</strong>”关键词，我们看到的代码片段如下所示：</span></p>
<p></p><pre class="crayon-plain-tag">b.pasteType === 1 &amp;&amp; (d = d.replace(/&lt;br[^&gt;]*&gt;/ig, "\n"), d = d.replace(/&lt;\/p&gt;&lt;p[^&gt;]*&gt;/ig, "\n"), d = d.replace(/&lt;[^&gt;]+&gt;/g, ""), d = d.replace(/&amp;nbsp;/ig, " "), d = d.replace(/\n\s*\n/g, "\n"), d = d.replace(/ {2}/g, " &amp;nbsp;"), b.newlineTag == "p" ? /\n/.test(d) &amp;&amp; (d = d.replace(/^/, "&lt;p&gt;").replace(/$/, "&lt;/p&gt;").replace(/\n/g, "&lt;/p&gt;&lt;p&gt;")) : d = d.replace(/\n/g, "&lt;br /&gt;$&amp;")), b.insertHtml(d, !0))</pre><p>&nbsp;</p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">这段代码就是实现了CTRL+V的粘贴功能，获取粘贴板内的内容d，然后对其进行简单性的处理然后赋值给编辑器b。</span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">在这里我们不难发现并未去除过多的HTML代码且清楚超链接，所以我们需要在这里对编辑器对象b做一些后加处理，我们通过b.text()就可以拿到编辑器内的纯文本内容了，然后再将其赋值给编辑器b不就行了么？</span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">所以得到了修改后的代码片段：</span></p>
<p></p><pre class="crayon-plain-tag">b.pasteType === 1 &amp;&amp; (d = d.replace(/&lt;br[^&gt;]*&gt;/ig, "\n"), d = d.replace(/&lt;\/p&gt;&lt;p[^&gt;]*&gt;/ig, "\n"), d = d.replace(/&lt;[^&gt;]+&gt;/g, ""), d = d.replace(/&amp;nbsp;/ig, " "), d = d.replace(/\n\s*\n/g, "\n"), d = d.replace(/ {2}/g, " &amp;nbsp;"), b.newlineTag == "p" ? /\n/.test(d) &amp;&amp; (d = d.replace(/^/, "&lt;p&gt;").replace(/$/, "&lt;/p&gt;").replace(/\n/g, "&lt;/p&gt;&lt;p&gt;")) : d = d.replace(/\n/g, "&lt;br /&gt;$&amp;")), b.insertHtml(d, !0), b.html(b.text()))</pre><p><span style="color: #555555; font-family: '楷体 Std R'; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 42px; orphans: auto; text-align: start; text-indent: 28px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">不难看出只是在最后的地方追加了</span></p>
<p><span style="color: #000000; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;">b.html(b.text())</span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1098</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kindeditor编辑器高级篇：如何做到一键清除HTML格式的同时去掉kindeditor编辑器内全部超链接(a)</title>
		<link>https://www.softwareace.cn/?p=1095</link>
		<comments>https://www.softwareace.cn/?p=1095#comments</comments>
		<pubDate>Wed, 07 Jan 2015 09:51:02 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[kindeditor]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1095</guid>
		<description><![CDATA[在使用kindeditor编辑器的时候，大多数可能都是从某些网页直接粘贴内容复制到kindeditor编辑器内 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">在使用kindeditor编辑器的时候，大多数可能都是从某些网页直接粘贴内容复制到kindeditor编辑器内，这样可能内容就包含很多HTML标签和超链接。为了最快地进行内容编辑往往都使用kindeditor的“一键清除HTML”的功能，但是这个功能默认情况下是不会清除超链接的标签的。这一点往往令很多做编辑的人很是头疼，最后这个光荣的任务就落到了我们程序员的身上。</span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">为了解决在清除HTML标签的同时也清除掉超链接，不得不研究了一番kindeditor的源码。最后将其问题的解决方案归咎到了一键清除HTML的对应</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">plugins/clearhtml/</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">clearHTML.js文件内。通过深入分析得出了这样两个解决方案：</span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;"><strong style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;">1、修改formatHtml格式化方法</strong></span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">见</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">plugins/clearhtml/</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">clearHTML.js的formatHtml格式化方法如下所示：</span></p>
<p></p><pre class="crayon-plain-tag">html = K.formatHtml(html, {
			a : ['href', 'target'],
			embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
			img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
			table : ['border'],
			'td,th' : ['rowspan', 'colspan'],
			'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : []
});</pre><p>&nbsp;</p>
<div id="highlighter_372143" class="syntaxhighlighter " style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 1em 0px; padding: 1px; text-align: left; float: none; position: relative; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 950px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; color: #555555; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #e7e5dc;">
<div class="bar" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none;">
<div class="toolbar" style="border: 1px solid #e7e5dc; outline: 0px; font-size: 1px; vertical-align: baseline; margin: 0px; padding: 8px 8px 8px 0px; text-align: left; float: none; position: absolute; left: auto; top: 0px; right: 0px; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none #f8f8f8;"><a class="item viewSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/page_white_code.png') no-repeat;" title="view source" href="http://www.stepday.com/topic/?688#viewSource">view source</a><a class="item printSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/printer.png') no-repeat;" title="print" href="http://www.stepday.com/topic/?688#printSource">print</a><a class="item about" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/help.png') no-repeat;" title="?" href="http://www.stepday.com/topic/?688#about">?</a></div>
</div>
</div>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">从格式化方法不难看出它始终保持了a标签的href和target两个属性，所以问题的根本就在这里了的，解决方案就是去掉a标签的一切，修改后的代码如下所示：</span></p>
<p></p><pre class="crayon-plain-tag">html = K.formatHtml(html, {
			embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
			img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
			table : ['border'],
			'td,th' : ['rowspan', 'colspan'],
			'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : []
});</pre><p>&nbsp;</p>
<div id="highlighter_41853" class="syntaxhighlighter " style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 1em 0px; padding: 1px; text-align: left; float: none; position: relative; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 950px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; color: #555555; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #e7e5dc;">
<div class="bar" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none;">
<div class="toolbar" style="border: 1px solid #e7e5dc; outline: 0px; font-size: 1px; vertical-align: baseline; margin: 0px; padding: 8px 8px 8px 0px; text-align: left; float: none; position: absolute; left: auto; top: 0px; right: 0px; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none #f8f8f8;"><a class="item viewSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/page_white_code.png') no-repeat;" title="view source" href="http://www.stepday.com/topic/?688#viewSource">view source</a><a class="item printSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/printer.png') no-repeat;" title="print" href="http://www.stepday.com/topic/?688#printSource">print</a><a class="item about" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/help.png') no-repeat;" title="?" href="http://www.stepday.com/topic/?688#about">?</a></div>
</div>
<div class="lines" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;"></div>
</div>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;"><strong style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;">2、直接调用取消超链接的方法</strong></span></p>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">通过查找源码内的方法，可以直接调用去掉超链接的方法，同样修改</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">plugins/clearhtml/</span><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">clearHTML.js文件内，在</span></span></p>
<div id="highlighter_587187" class="syntaxhighlighter " style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 1em 0px; padding: 1px; text-align: left; float: none; position: relative; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 950px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; color: #555555; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #e7e5dc;">
<div class="bar" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none;">
<div class="toolbar" style="border: 1px solid #e7e5dc; outline: 0px; font-size: 1px; vertical-align: baseline; margin: 0px; padding: 8px 8px 8px 0px; text-align: left; float: none; position: absolute; left: auto; top: 0px; right: 0px; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none #f8f8f8;"><a class="item viewSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/page_white_code.png') no-repeat;" title="view source" href="http://www.stepday.com/topic/?688#viewSource">view source</a><a class="item printSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/printer.png') no-repeat;" title="print" href="http://www.stepday.com/topic/?688#printSource">print</a><a class="item about" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/help.png') no-repeat;" title="?" href="http://www.stepday.com/topic/?688#about">?</a></div>
</div>
<div class="lines" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;">
<div class="line alt1" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;"><code class="number" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px 0.3em 0px 0px; text-align: right; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 3em; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; color: #5c5c5c; background: none;">1.</code><span class="content" style="border-width: 0px 0px 0px 3px; border-left-style: solid; border-left-color: #6ce26c; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px 0px 0px 3.3em; padding: 0px 0px 0px 0.5em; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; color: #000000; background: none #ffffff;"><span class="block" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px 0px 0px 1.5em; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; text-indent: -1.5em; background: url('http://www.stepday.com/images/wrapping.png') 0px 1.1em no-repeat;"><code class="plain" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #000000; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none;">self.addBookmark();</code></span></span></div>
</div>
</div>
<p style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #555555; font-family: '楷体 Std R'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 30px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-indent: 2em; background: #ffffff;"><span style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; line-height: 3; background: transparent;">后面追加一句语句：</span></p>
<div id="highlighter_432333" class="syntaxhighlighter " style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 1em 0px; padding: 1px; text-align: left; float: none; position: relative; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 950px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; color: #555555; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #e7e5dc;">
<div class="bar" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none;">
<div class="toolbar" style="border: 1px solid #e7e5dc; outline: 0px; font-size: 1px; vertical-align: baseline; margin: 0px; padding: 8px 8px 8px 0px; text-align: left; float: none; position: absolute; left: auto; top: 0px; right: 0px; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; background: none #f8f8f8;"><a class="item viewSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/page_white_code.png') no-repeat;" title="view source" href="http://www.stepday.com/topic/?688#viewSource">view source</a><a class="item printSource" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/printer.png') no-repeat;" title="print" href="http://www.stepday.com/topic/?688#printSource">print</a><a class="item about" style="border: 0px; outline: 0px; font-size: 12px; vertical-align: baseline; margin: 0px 0px 0px 8px; padding: 0px; color: #a0a0a0; text-decoration: none; text-align: left; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: 16px; width: 16px; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; overflow: hidden; text-indent: -5000px; background: url('http://www.stepday.com/images/help.png') no-repeat;" title="?" href="http://www.stepday.com/topic/?688#about">?</a></div>
</div>
<div class="lines" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;">
<div class="line alt1" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; background: transparent;"><code class="number" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px 0.3em 0px 0px; text-align: right; float: left; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: 3em; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; color: #5c5c5c; background: none;">1.</code><span class="content" style="border-width: 0px 0px 0px 3px; border-left-style: solid; border-left-color: #6ce26c; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px 0px 0px 3.3em; padding: 0px 0px 0px 0.5em; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; color: #000000; background: none #ffffff;"><span class="block" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px 0px 0px 1.5em; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; display: block; text-indent: -1.5em; background: url('http://www.stepday.com/images/wrapping.png') 0px 1.1em no-repeat;"><code class="keyword" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #006699; font-weight: normal; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-style: normal; background: none;"><code class="plain" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #000000; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">self.exec(</code><code class="string" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: blue; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">'unlink'</code><code class="plain" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #000000; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">,<span class="Apple-converted-space"> </span></code><code class="keyword" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #006699; font-weight: normal; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">null</code><code class="plain" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #000000; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">);<span class="Apple-converted-space"> </span></code><code class="comments" style="border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; margin: 0px; padding: 0px; color: #008200; text-align: left; float: none; position: static; left: auto; top: auto; right: auto; bottom: auto; height: auto; width: auto; line-height: normal; font-family: Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-weight: normal; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: -21px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none #ffffff;">//去掉编辑器内所有的超链接</code></code></span></span></div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1095</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
