<?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>Everything is selfish, include the God.</description>
	<lastBuildDate>Wed, 08 Sep 2010 04:49:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>[MOD]SPAW Editor</title>
		<link>http://icyleaf.com/2007/09/29/mod-spaw-editor/</link>
		<comments>http://icyleaf.com/2007/09/29/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...幸好的是现在2.0版本以上已经支持了FF，Opera 9以及Safari等浏览器 ---------------- 演示点这里 ---------------- 本来我想把SPAW Editor做成F2BLOG的编辑器插件，搞了半天没有弄明白代码哪是哪。。。看看它自身带的几个编辑器，貌似代码比较复杂，还需要支持一些第三方的SPAW2本身没有插件，更郁闷的是代码必须手动一条条转换成UBB格式...要是这样弄，要浪费多长的时间。。。 在国内的网站很少有关于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是否加载成功。 如果上述步骤正确，绝对是加载成功的！ 修改之处： 修改文件--"wp-includes/general-template.php" 温馨提示：最好自己先备份一份~ 打开此文件并搜索：（大概在 870行上下） function the_editor($content, $id = 'content', $prev_id = 'title') { $rows = get_option('default_post_edit_rows'); if (($rows &#60; &#8230; <a href="http://icyleaf.com/2007/09/29/mod-spaw-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
SPAW Editor是一个WYSIWYG（- -!不知道什么意思？看我上篇日志先）的HTML编辑器，从上面的图片大家也能看的出来，界面非常的漂亮，功能也非常的强大，强大到支持表格！而且还支持浮动工具条模式。
此编辑器目前支持的浏览器也非常的多，1.0的时候仅仅支持IE...幸好的是现在2.0版本以上已经支持了FF，Opera 9以及Safari等浏览器
----------------
演示点这里
----------------
本来我想把SPAW Editor做成F2BLOG的编辑器插件，搞了半天没有弄明白代码哪是哪。。。看看它自身带的几个编辑器，貌似代码比较复杂，还需要支持一些第三方的SPAW2本身没有插件，更郁闷的是代码必须手动一条条转换成UBB格式...要是这样弄，要浪费多长的时间。。。
在国内的网站很少有关于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是否加载成功。
如果上述步骤正确，绝对是加载成功的！
修改之处：
修改文件--"wp-includes/general-template.php"
温馨提示：最好自己先备份一份~
打开此文件并搜索：（大概在 870行上下）
function the_editor($content, $id = 'content', $prev_id = 'title') {
$rows = get_option('default_post_edit_rows');
if (($rows &lt; 3) || ($rows &gt; 100))
$rows = 12;
然后选中这整个function函数体，直到下面的地方结束：
   &lt;?php endif; ?&gt;
//--&gt;
&lt;/script&gt;
&lt;?php
}
把上面的函数替换为：
function the_editor($content, $id = 'content', $prev_id = 'title') {
// 转换为HTML
$content = html_entity_decode($content);
// 加载SPAW2的配置文件
include('../spaw2/spaw.inc.php');
$spaw_content = new SpawEditor($id, $content);
$spaw_content-&gt;show();
}
]]></content:encoded>
			<wfw:commentRss>http://icyleaf.com/2007/09/29/mod-spaw-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
