Use the Editor's instance to query the iframe

{{>editor-inline-instance-source}}

Working with InlineEditor

`InlineEditor` is not a fully functional Editor, it is simply the base utility that will be used under the hood to create an Editor.

When the Editor is created, it creates a YUI instance inside itself and allows you to load new modules just for the editor. This means that you now have the full power of YUI 3 inside the Editor. You can use Event, Stylesheet, Node and even DD inside the content editable node, without having to load all the JavaScript inside the document. In this example we will show how to use the internal YUI instance to get Node instances from the Editor.

Getting access to this instance is simple. Just use the `getInstance` method on the Editor instance.

Creating the Editor

In this step we are going to do the initial render of the Editor, set its content, and focus it when it's ready.

``` YUI().use('editor-inline', function(Y) { //Create the Base Editor var editor = new Y.InlineEditor({ content: '

This is a test

This is a test

', extracss: '.foo { font-weight: normal; color: black; background-color: yellow; }' }); //Rendering the Editor editor.render('#editor'); }); ```

Full Example Source

HTML

``` {{>editor-inline-instance-source-html}} ```

CSS

``` {{>editor-inline-instance-source-css}} ```

Javascript

``` {{>editor-inline-instance-source-js}} ```