<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://www.majordojo.com/projects/FeedManager/atom.xsl" type="text/xsl" media="screen"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html" />
  <link rel="self" type="application/atom+xml" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html" />
  <id>tag:www.thinkjam.org,2009:/zoptuno//2/tag:www.thinkjam.org,2008:/zoptuno//2.1212-</id>
  <updated>2009-09-21T03:08:32Z</updated>
  <title>Comments for 用YUI Editor替换MT的所见即所得编辑器</title>
  <subtitle>My think. My dream.</subtitle>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.31-zh-cn</generator>
  <entry>
    <id>tag:www.thinkjam.org,2008:/zoptuno//2.1212</id>
    <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.thinkjam.org/loveblog/batom.cgi/weblog/blog_id=2/entry_id=1212" title="用YUI Editor替换MT的所见即所得编辑器" />
    <published>2008-07-09T15:41:32Z</published>
    <updated>2008-07-09T17:02:03Z</updated>
    <title>用YUI Editor替换MT的所见即所得编辑器</title>
    <summary>Movable Type虽提供有所见即所得的富文本编辑功能，但并不好用。且不说生...</summary>
    <author>
      <name>平生一笑</name>
      <uri>http://www.thinkjam.org/zoptuno</uri>
    </author>
    
    <category term="MovableType" />
    
    <content type="html" xml:lang="en" xml:base="http://www.thinkjam.org/zoptuno/">
      <![CDATA[<a target="_blank" href="http://tu.6.cn/pic/show/id/133697"><img class="yui-img" title="MT YUI Editor截图" src="http://i3.6.cn/cvbnm/cb/05/7a/68fcf4b863ab1fe33464c4765eba0b1c.jpg" alt="MT YUI Editor截图"></a><br><br><a target="_blank" href="http://www.movabletype.org">Movable Type</a>虽提供有所见即所得的富文本编辑功能，但并不好用。且不说生成的代码中有些许垃圾，就是诸如给文字加颜色、设定字体大小的简单操作，实现起来都要费上九牛二虎之力（必须切换到源码编辑模式下）。更令人恼火的，要数插入图片操作，一点击相应的图标，就毫不留情的弹出MT的资源管理器，根本不给你引用外部图片链接的机会。防止"盗链"做到这种地步，真真是令人欲哭无泪。<br><br>怎么办？活人不能让尿憋死，但MT 4.0关于编辑器的JS复杂了很多，要快速解决问题，只能依靠社区中某些强人开发的插件。找来找去，终于找到了一个叫做<a target="_blank" href="http://www.richardbenson.co.uk/work/programming/mt-plugins/yuieditor/" rel="bookmark">YUI Editor in Movabletype</a>的，解决了这个恼人的问题。当然，在这中间还是有不少技巧可言，听俺慢慢道来。]]>
      <![CDATA[首先，下载最新版本的<a target="_blank" href="http://www.richardbenson.co.uk/work/programming/mt-plugins/yuieditor/" rel="bookmark">YUI Editor in Movabletype</a>。它是一个zip格式的压缩包，解压后，将其中的文件上传到MT程序安装的相应目录。之后，打开MT程序根目录下的mt-config.cgi文件，随便找个地方，新起一行，加入以下内容：<br><br><blockquote>RichTextEditor YUIEditor</blockquote><br>好了，再次登录进入MT后台，是不是编辑器已经被YUI Editor取代了？<br><br>不过默认情况下，<a target="_blank" href="http://www.richardbenson.co.uk/work/programming/mt-plugins/yuieditor/" rel="bookmark">YUI Editor in Movabletype</a>中插入图片，还是会打开MT的资源管理器。要想取消，需要打开<b>mt-tatic\plugins\YUIEditor\config.js</b>文件，将<b>ConfigUseMTAssets</b>的值设为<b>false</b>。这样设置后，再次点击插入图片，会用YUI Editor的图片插入对话框替代MT资源管理器。特别提醒一句，YUI Editor的图片插入操作在对话框中并没有"插入"或"确定"按钮，编辑完图片地址等信息后，要在编辑器旁边的随便哪个地方点一下，图片才会正常插入。这样的操作好像跟Mac系统有些相似，刚开始用可能觉得难以理解。<br><br>设定ConfigUseMTAssets的值为false后，插入文件的功能也会同时消失。如果既想使用YUI的图片插入功能，又想在编辑日记时上传文件，则请打开<b>mt-tatic\plugins\YUIEditor\js\yui_editor.js</b>文件，去掉从if (useMTAssets)开始，到<b>//We need to add another button to access MT's file asset as well as the image asset</b>前的所有内容，切记不要忘记再去掉一个对应的<b>}</b>括号。<br><br>经过编辑器改造后的MT变得好用了许多，这下俺是彻底抛弃了长期以来一直使用的用<b>转换换行符</b>方式格式化文本，你呢？<br>]]>
    </content>
  </entry>

  <entry>
    <id>tag:www.thinkjam.org,2008:/zoptuno//2.1212-comment:3804</id>
    <thr:in-reply-to ref="tag:www.thinkjam.org,2008:/zoptuno//2.1212" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html"/>
    <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html#c3804" />
    <title>Comment from CaTsEyEs on 2008-07-11</title>
    <author>
        <name>CaTsEyEs</name>
<!--        <uri>http://blog.catseyes.tw</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://blog.catseyes.tw">
	<![CDATA[<p>YUI 確實很好用...不過在插入YouToBe影片的時候語法好像會被吃掉，不知您這裡是否能夠成功插入YouToBe的影片呢？</p>]]>
    </content>
    <published>2008-07-11T11:56:59Z</published>
    <updated>2008-07-11T11:56:59Z</updated>
  </entry>

  <entry>
    <id>tag:www.thinkjam.org,2008:/zoptuno//2.1212-comment:3861</id>
    <thr:in-reply-to ref="tag:www.thinkjam.org,2008:/zoptuno//2.1212" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html"/>
    <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html#c3861" />
    <title>Comment from nsnake on 2008-09-02</title>
    <author>
        <name>nsnake</name>
<!--        <uri>http://blog.sakuras.cn</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://blog.sakuras.cn">
	<![CDATA[<p>我按你的方法修改好了，确实挺好用<br />
顺便说一下<br />
想如果既想使用YUI的图片插入功能，又想在编辑日记时上传文件，直接编辑yui_editor.js就可以了，不需要在设置config.js这个文件，哎，这里走了个弯路的<br />
</p>]]>
    </content>
    <published>2008-09-02T08:29:58Z</published>
    <updated>2008-09-02T08:29:58Z</updated>
  </entry>

  <entry>
    <id>tag:www.thinkjam.org,2008:/zoptuno//2.1212-comment:3862</id>
    <thr:in-reply-to ref="tag:www.thinkjam.org,2008:/zoptuno//2.1212" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html"/>
    <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html#c3862" />
    <title>Comment from 平生一笑 on 2008-09-02</title>
    <author>
        <name>平生一笑</name>
<!--        <uri>http://www.thinkjam.org/zoptuno</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.thinkjam.org/zoptuno">
	<![CDATA[<p>条条大路通罗马嘛！之所以设置config.js，是为了以后好跟这个插件的升级保持一致而已</p>]]>
    </content>
    <published>2008-09-02T09:26:30Z</published>
    <updated>2008-09-02T09:26:30Z</updated>
  </entry>

  <entry>
    <id>tag:www.thinkjam.org,2008:/zoptuno//2.1212-comment:3941</id>
    <thr:in-reply-to ref="tag:www.thinkjam.org,2008:/zoptuno//2.1212" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html"/>
    <link rel="alternate" type="text/html" href="http://www.thinkjam.org/zoptuno/archives/2008/07/mt-yui-editormt.html#c3941" />
    <title>Comment from grandia on 2008-11-27</title>
    <author>
        <name>grandia</name>
<!--        <uri>http://i3975.com</uri> -->
    </author>
    <content type="html" xml:lang="en" xml:base="http://i3975.com">
	<![CDATA[<p>你好。</p>

<p>在mt文件下，除了mt-config.cgi，還有另一個mt-config.cgi-original。不管是在前者還是後者加入<br />
RichTextEditor YUIEditor，都不能使用。</p>

<p>在plugin那裡，確實顯示已經啟用這項功能，但在編輯新文章那裡卻沒辦法使用。</p>

<p>我是用notepad打開mt config來加入RichTextEditor YUIEditor，在最後一行。需要特別注明什麼嗎?</p>

<p>還是需要在其它地方再做設定??</p>

<p>謝謝</p>]]>
    </content>
    <published>2008-11-26T18:46:59Z</published>
    <updated>2008-11-26T18:46:59Z</updated>
  </entry>

</feed>
