Please turn on JavaScript. To find out how to do this visit the WebWise JavaScript guide.


The glow.widgets.Editor widget allows you to create a Rich Text Editor interface for a textarea.

Using the Editor widget

Your editor is assigned to a textarea, it will take the dimensions of this textarea and render exactly in its place on the screen.

In the example below, an editor is created using a textarea. This will create an editor with the default options.


<textarea id="commentEntry" name="commentEntry" rows="10" cols="100"></textarea>


var editor = new glow.widgets.Editor("#commentEntry");

Common options

The second argument in the Editor constructor is an options object with the single property theme.

The editor includes two themes, "light" and "dark".

This example uses the same HTML and CSS, but uses the "dark" theme.


var editor = new glow.widgets.Editor("#commentEntry", {theme: "dark"});

Known issues

During development we came across a number of issues - mostly around keyboard access - that are documented below.

Safari 2 support

Unfortunately the Editor widget does not support Safari 2, this is due to a number of issues found in relation to mouse events and cursor range functionality within iframes during development.

The developer does not have to handle Safari 2 in any special way. When viewed in Safari 2 the Editor will not show. The user will see the textarea instead.

Safari 3+ and Chrome

Webkit appears to have issues with the beforeunload event when there is an iframe involved. This affects the Editor widget because we are depending on that event to update the textarea when the users use the back/forward button to leave and then return to the page.

Keyboard access in Safari

Keyboard access in Safari via the tab key can be activated in the preferences. However, once the rich text area gains focus, the Mac version of Safari does not let you tab out of the area, pressing the tab key will enter a tab character.

Although Safari 2 is currently on the BBC's list of supported browsers, due to the issues highlighted above it is not supported with this widget.

Keyboard access in Opera on the Mac

Opera on the Mac does not work with all keyboard access shortcuts. The browser will ignore most keys when held in tandem with the command key.

BBC © 2014 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.