Home » Projects » YUI Rich Text Editor in MovableType

YUI Rich Text Editor in MovableType

YUI has become my new favourite Rich Text Editor and I have been implementing it left right and center. It's extensability, features and ease of use are unparralled. It made sense for all these features to be available to me in MovableType also but no-one seems to have yet done that.  What choice did I have but to do it myself?

This plugin adds the YUI editor to your MovableType installation as the main tich text editor, so you get something like this in yout MT:

yuieditor1.jpg
It's an easy install, and has a few configuration options which are currently only documented in the plugin files, but I will add some more to this as it expands and approached version 1.

There is a feed and a category to help keep up to date.

Features
  • Places the Yahoo User Interface Rich Text Editor into your MovableType Installation
  • Generates XHTML markup (markup can be changed via config)
  • Uses default Movabletype asset management but this can be disabled through config
  • Allows admins to extend the YUI Editor without changing plugin code, via config
  • Full screen view and HTML code editor added to the default YUI options
  • Doesn't change either YUI or MT so won't affect customisations you may have made
  • Can use either Yahoo! hosted JS and CSS files or your own local copy of the build folder

Install

  1. Download Zip file
  2. Extract into your MT installation root, keeping folders
  3. Edit your mt-config.cgi and add "RichTextEditor YUIEditor" to the end

Most users can stop there, if you wish to make further changes, see the "Configuration" section

Upgrade

To upgrade, make a copy of mt-static/plugins/YUIEditor/config.js before uploading new version. Then reapply your changes.

At this stage of development, the config file is changing and expanding quite often, so it is important that you know how to reconfigure your installation after an upgrade.  As the plugin is stabilised, upgrade versions will be published that only affect changed files.

Configuration

There are a few options available in mt-static/plugins/YUIEditor/config.js to change your installation of the plugin including the ability to add your own customisations to the editor based on standard YUI code.

The core options in config.js are:

  • ConfigYUIBase
    If you wish to download the YUI library to your own server, you can use this option to specify where you have installed it.  The suggested option places the YUI build folder in mt-static/plugins/yui/
  • ConfigUseMTAssets (true/false, default: true)
    Allows you to turn off the default MT asset management and go for a simpler system based on the YUI editor's defaults
  • ConfigStripFormTags (true/false, default: true)
    Specifies whether the editor should remove form tags and leave the contents alone or leave them intact
  • ConfigAutoHeight (true/false, default: true)
    Whether to have the editor stretch to fit the contents
  • ConfigMarkupType (default: xhtml)
    What format should the HTML generated be checked against. Options are: semantic, css, default or xhtml
There is also a function (afterYUIInit) that allows you to do your own edits to the YUI Editor.  A reference to the editor is created for you by default under the name "YUIEditor".  There is an example in the config for adding a button, and further examples of all you can do with the YUI editor can be found on the YUI Rich Text Editor website.

Related Entries

YUI Editor in Movabletype v1.1
This update merely makes the plugin use the latest (2.6.0) library.A small change was made in config.js, so back that…
YUI Editor in Movabletype v1.0
At last I can make this 1.0!IE6 is not yet perfect, but as good as it can get until Yahoo!…
YUI Editor in Movabletype v0.9.10
Finally cracked the IE7 issues (I hope!  Please let me know if you find anything) and nearly ready to call…
YUI Editor in Movabletype v0.9.9
Fair few little tweaks here and a change of thinking around the config file.Major thanks to Dav Glass (the author…
YUI Editor in Movabletype v0.9.8
Tiny (but important) update this time, I have added the option for xhtml code to be produced and set that…
YUI in MovableType v0.9.7
Another update, please see original post for details.Download 0.9.7To-Do:Add option for local or Yahoo! hosted JSGet text area to expand…
YUI RTE in MovableTyle v0.9.5
Updated version, please see original post for details.VERSION NOTES:-------------------------------0.9.5 - Nearly at final    ~ Now uses MT's asset managment as…
YUI Rich Text Editor in MovableType
UPDATE: I've set up a feed and a category to help keep up to dateYUI has become my new favourite…
joke