<?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; SPAW Editor</title>
	<atom:link href="http://icyleaf.com/tag/spaw-editor/feed/" rel="self" type="application/rss+xml" />
	<link>http://icyleaf.com</link>
	<description>icyleaf&#039;s blog - 心外无理，心外无物，心外无事</description>
	<lastBuildDate>Tue, 13 Dec 2011 02:34:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[MOD]SPAW Editor</title>
		<link>http://icyleaf.com/2007/09/mod-spaw-editor/</link>
		<comments>http://icyleaf.com/2007/09/mod-spaw-editor/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 17:41:00 +0000</pubDate>
		<dc:creator>icyleaf</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SPAW Editor]]></category>

		<guid isPermaLink="false">http://www.icyleaf.cn/2007/09/29/%e3%80%90wp-mod%e3%80%91spaw-editor/</guid>
		<description><![CDATA[SPAW Editor是一个WYSIWYG（- -!不知道什么意思？看我上篇日志先）的HTML编辑器，从上面的图片大家也能看的出来，界面非常的漂亮，功能也非常的强大，强大到支持表格！而且还支持浮动工具条模式。 此编辑器目前支持的浏览器也非常的多，1.0的时候仅仅支持IE&#8230;幸好的是现在2.0版本以上已经支持了FF，Opera 9以及Safari等浏览器 &#8212;&#8212;&#8212;&#8212;&#8212;- 演示点这里 &#8212;&#8212;&#8212;&#8212;&#8212;- 本来我想把SPAW Editor做成F2BLOG的编辑器插件，搞了半天没有弄明白代码哪是哪。。。看看它自身带的几个编辑器，貌似代码比较复杂，还需要支持一些第三方的SPAW2本身没有插件，更郁闷的是代码必须手动一条条转换成UBB格式&#8230;要是这样弄，要浪费多长的时间。。。 在国内的网站很少有关于SPAW Editor的东西，SPAW Editor给的下载演示页面没有提交的方法，官方的文档只看明白了一些，太长了。。。。所以我还是去官方论坛瞅瞅，让我找到了MOD进入WP的方法，我在自己的机器上测试成功! 前期准备： 1.我使用的是wp2.3 beta3版本，一般来说所有版本均适合。 2.下载SPAW2压缩包，解压后是一个名spaw2文件夹，修改spaw2/config/config.default.php为spaw2/config/config.php 3.把SPAW2Editor上传到你们WP目录的下面（举例：你的wp目录是http://icyleaf.cn/blog，那么你的把解压缩后的spaw2文件夹放在blog目录下就OK） 4.测试SPAW2Editor，还按上面地址的说明，打开浏览器，访问http://icyleaf.cn/blog/spaw2.demo/demo.php，看看SPAW2Editor是否加载成功。 如果上述步骤正确，绝对是加载成功的！ 修改之处： 修改文件&#8211;&#8221;wp-includes/general-template.php&#8221; 温馨提示：最好自己先备份一份~ 打开此文件并搜索：（大概在 870行上下） function the_editor($content, $id = &#8216;content&#8217;, $prev_id = &#8216;title&#8217;) { $rows = get_option(&#8216;default_post_edit_rows&#8217;); if (($rows &#60; &#8230; <a href="http://icyleaf.com/2007/09/mod-spaw-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!--DATA[  --><img src="http://www.solmetra.com/img/products/spaw_big.gif" alt="spaw2" style="width: 435px; height: 111px" border="0" height="135" width="540" /><br />
<a href="http://www.solmetra.com/en/disp.php/en_index" target="_blank">SPAW Editor</a>是一个WYSIWYG（- -!不知道什么意思？看我上篇日志先）的HTML编辑器，从上面的图片大家也能看的出来，界面非常的漂亮，功能也非常的强大，强大到<strong>支持表格</strong>！而且还支持<a href="http://www.solmetra.com/en/disp.php/en_products/en_spaw/en_spaw_demo?page=2" target="_blank">浮动工具条模式</a>。<br />
此编辑器目前支持的浏览器也非常的多，1.0的时候仅仅支持IE&#8230;幸好的是现在2.0版本以上已经支持了FF，Opera 9以及Safari等浏览器<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<a href="http://www.solmetra.com/en/disp.php/en_products/en_spaw/en_spaw_demo" target="_blank"><font color="#e75973">演示点这里<br />
</font></a>&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
本来我想把SPAW Editor做成F2BLOG的编辑器插件，搞了半天没有弄明白代码哪是哪。。。看看它自身带的几个编辑器，貌似代码比较复杂，还需要支持一些第三方的SPAW2本身没有插件，更郁闷的是代码必须手动一条条转换成UBB格式&#8230;要是这样弄，要浪费多长的时间。。。<br />
在国内的网站很少有关于SPAW Editor的东西，SPAW Editor给的下载演示页面没有提交的方法，官方的文档只看明白了一些，太长了。。。。所以我还是去官方论坛瞅瞅，让我找到了MOD进入WP的方法，我在自己的机器上测试成功!<br />
<span id="more-7"></span><strong>前期准备</strong>：<br />
1.我使用的是wp2.3 beta3版本，一般来说所有版本均适合。<br />
2.下载SPAW2压缩包，解压后是一个名spaw2文件夹，修改<strong>spaw2/config/config.default.php</strong>为<strong>spaw2/config/config.php</strong><br />
3.把SPAW2Editor上传到你们WP目录的下面（举例：你的wp目录是<a href="http://icyleaf.cn/blog"><font color="#e75973">http://icyleaf.cn/blog</font></a>，那么你的把解压缩后的spaw2文件夹放在blog目录下就OK）<br />
4.测试SPAW2Editor，还按上面地址的说明，打开浏览器，访问<a href="http://icyleaf.cn/blog/spaw2.demo/demo.php"><font color="#e75973">http://icyleaf.cn/blog/spaw2.demo/demo.php</font></a>，看看SPAW2Editor是否加载成功。<br />
如果上述步骤正确，绝对是加载成功的！</p>
<p><strong>修改之处：<br />
</strong>修改文件&#8211;&#8221;wp-includes/general-template.php&#8221;<br />
<strong><font color="#ff0000">温馨提示：最好自己先备份一份~</font></strong><br />
打开此文件并搜索：（大概在 870行上下）</p>
<p style="border: 1px solid #c3ced9; margin: 0px 0px 5px; overflow: auto; width: auto; height: auto; background-color: #f9fbfc; text-align: left">function the_editor($content, $id = &#8216;content&#8217;, $prev_id = &#8216;title&#8217;) {<br />
$rows = get_option(&#8216;default_post_edit_rows&#8217;);<br />
if (($rows &lt; 3) || ($rows &gt; 100))<br />
$rows = 12;</p>
<p>然后选中这整个function函数体，直到下面的地方结束：</p>
<p style="border: 1px solid #c3ced9; margin: 0px 0px 5px; overflow: auto; width: auto; height: auto; background-color: #f9fbfc; text-align: left">   &lt;?php endif; ?&gt;<br />
//&#8211;&gt;<br />
&lt;/script&gt;<br />
&lt;?php<br />
}</p>
<p>把上面的函数替换为：</p>
<p style="border: 1px solid #c3ced9; margin: 0px 0px 5px; overflow: auto; width: auto; height: auto; background-color: #f9fbfc; text-align: left">function the_editor($content, $id = &#8216;content&#8217;, $prev_id = &#8216;title&#8217;) {<br />
// 转换为HTML<br />
$content = html_entity_decode($content);</p>
<p>// 加载SPAW2的配置文件<br />
include(&#8216;../spaw2/spaw.inc.php&#8217;);<br />
$spaw_content = new SpawEditor($id, $content);<br />
$spaw_content-&gt;show();<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://icyleaf.com/2007/09/mod-spaw-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

