• download
  • documentation
  • forums
  • demo
  • contact
  • blog

meteora

javascript widgets

Documentation

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Effect
  • Filebrowser
  • Form
  • Jsonrpc
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

What does this control do?

Converts any textarea element into a full featured WYSIWYG editor, thus allowing the user to control the appearence of the information that he/she is about to send without having to edit source code.

For an usage example check out the Meteora.Editor demo.

How to use

In order to use this control, paste this line of javascript right at the beginning of your script tag:

Meteora.uses('Meteora.Editor');

We will need a textarea too:

<textarea id="id_of_the_textarea"></textarea>

This is the general usage example:

new Editor(
  // ELEMENT
  // textarea, you can use an id or an object reference.
  'id_of_the_textarea',
  // OPTIONS  
  {
    // null
  }
);

The code generated by the editor will be saved periodically into its associated textarea, in plain HTML format.

Options

mode

Possible values are nano, mini, basic and advanced, depeding on the value you use, a set of editor buttons will be displayed:
  • nano: bold, italic, underline, strikethrough, createlink, removeformat
  • mini: bold, italic, underline, strikethrough, createlink, insertorderedlist, insertunorderedlist, removeformat, fullscreen
  • basic: bold, italic, underline, strikethrough, createlink, insertorderedlist, insertunorderedlist, justifyleft, justifyright, justifyfull, justifycenter, indent, outdent, removeformat, fullscreen'
  • advanced: bold, italic, underline, strikethrough, createlink, insertorderedlist, insertunorderedlist, justifyleft, justifyright, justifyfull, justifycenter, indent, outdent, inserthorizontalrule, insertimage, removeformat, fullscreen
If you don't specify a mode, all buttons will be displayed, unless you want only some specific buttons to be shown.

blank

URL of the editor's blank page (you can leave this option empty).

showSource

Set to true to show a tab that will enable the user to directly edit HTML code.

tabIndents

Set to false if you want the tab key to focus the next form's element. Such as the behaviour of the normal textarea.

autoSave

Here you can specify an URL where the contents of the textarea will be periodically sent, you can use this feature to save drafts.

autoSaveInterval

Interval to query the autoSave option.

variant

Possible values are 0 or 1 for some cosmetic variations.

buttons

An array of buttons to be shown, this will override the mode option. You can choose any of the list below:
  • bold
  • italic
  • underline
  • strikethrough
  • createlink
  • insertorderedlist
  • insertunorderedlist
  • justifyleft
  • justifyright
  • justifycenter
  • justifyfull
  • indent
  • outdent
  • inserthorizontalrule
  • insertimage
  • removeformat
  • fullscreen
By default, all buttons are shown.

Methods

reset()

Cleans the editor and its textarea.

Copyright © 2007-2009 Astrata Software.