index.mustache revision cc4d6cf159472379fc6931c6165c556d1fafe76a
6044N/A <p>The Rich Text Editor is a UI control that allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text.</p>
6044N/A <p>The current release of the Rich Text Editor for YUI 3 is the base utility layers that provide a foundation on which you can create an Editor. <strong>This version of Editor does not contain a GUI of any kind.</strong></p>
6044N/A<p>This simple example will create an Editable area inside of another Node. It will not contain a GUI, only the iframe. You can use various Editor events to wire up your own toolbar.</p>
6044N/A var editor = new Y.EditorBase({
6044N/A content: '<strong>This is <em>a test</em></strong> <strong>This is <em>a test</em></strong> '
6044N/A editor.render('#editor');
6044N/A<p>When the Editor is created, it creates a YUI instance inside itself and attaches that instance to the editable iframe.
6392N/AThis means that you now have the full power of YUI 3 inside the Editor iframe. You can use Event, Stylesheet, Node and even DD
6044N/A<p>Getting access to this instance is simple. Just use the `getInstance` method on the Editor instance, like this:</p>
6044N/A var editor = new Y.EditorBase({
6044N/A content: '<strong>This is <em>a test</em></strong> <strong>This is <em>a test</em></strong> '
editor.on('frame:ready', function() {
this.focus();
var inst = this.getInstance();
var body = inst.one('body');
var strongs = inst.all('strong');
editor.render('#editor');
<p>By default, the frame instance under the hood of Editor attaches a listener for all known DOM events. The example
var editor = new Y.EditorBase({
editor.on('frame:keydown', function(e) {
editor.on('frame:mouseup', function(e) {
editor.render('#editor');
<p>The `nodeChange` event is a special event that Editor emits so that you can react to certain important moments that occured.</p>
<p>This list contains the properties that are added to the Event object when the `nodeChange` event is fired.</p>
<td>The list of execCommands that belong to this change and the dompath that's associated with the changedNode</td>
<p>Using YUI 3's plugin architecture, this version of the Rich Text Editor is even more modular and extensible than the previous version.
Almost every part of the Editor infrastructure is a plugin or extension. Below you will find the current list of plugins shipped with Editor.</p>
<td>Plugs into frame to extend `document.execCommand` support.</td>
<td>Overrides the default tab key handler and indents/outdents the current block level element.</td>
<td>Paragraph/Bi-Directional support</td>