HTMLArea-3.0 Documentation

This documentation contains valid information, but is outdated in the terms that it does not covers all the features of HTMLArea. A new documentation project will be started, based on LaTeX.

Introduction

What is HTMLArea?

HTMLArea is a free WYSIWYG editor replacement for <textarea> fields. By adding a few simple lines of JavaScript code to your web page you can replace a regular textarea with a rich text editor that lets your users do the following:

Some of the interesting features of HTMLArea that set's it apart from other web based WYSIWYG editors are as follows:

Is it really free? What's the catch?

Yes! It's really free. You can use it, modify it, distribute it with your software, or do just about anything you like with it.

What are the browser requirements?

HTMLArea requires Internet Explorer >= 5.5 (Windows only), or Mozilla >= 1.3-Beta on any platform. Any browser based on Gecko will also work, provided that Gecko version is at least the one included in Mozilla-1.3-Beta (for example, Galeon-1.2.8). However, it degrades gracefully to other browsers. They will get a regular textarea field instead of a WYSIWYG editor.

Can I see an example of what it looks like?

Just make sure you're using one of the browsers mentioned above and see below.

Where can I find out more info, download the latest version and talk to other HTMLArea users?

You can find out more about HTMLArea and download the latest version on the HTMLArea homepage and you can talk to other HTMLArea users and post any comments or suggestions you have in the HTMLArea forum.

Keyboard shortcuts

The editor provides the following key combinations:

Installation

How do I add HTMLArea to my web page?

It's easy. First you need to upload HTMLArea files to your website. Just follow these steps.

  1. Download the latest version from the htmlArea homepage.
  2. Unzip the files onto your local computer (making sure to maintain the directory structure contained in the zip).
  3. Create a new folder on your website called /htmlarea/ (make sure it's NOT inside the cgi-bin).
  4. Transfer all the HTMLArea files from your local computer into the /htmlarea/ folder on your website.
  5. Open the example page /htmlarea/examples/core.html with your browser to make sure everything works.

Once htmlArea is on your website all you need to do is add some JavaScript to any pages that you want to add WYSIWYG editors to. Here's how to do that.

  1. Define some global variables. "_editor_url" has to be the absolute URL where HTMLArea resides within your website; as we discussed, this would be “/htmlarea/”. "_editor_lang" must be the language code in which you want HTMLArea to appear. This defaults to "en" (English); for a list of supported languages, please look into the "lang" subdirectory in the distribution.
    <script type="text/javascript">
       _editor_url = "/htmlarea/";
       _editor_lang = "en";
    </script>
  2. Include the "htmlarea.js" script:
    <script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
  3. If you want to change all your <textarea>-s into HTMLArea-s then you can use the simplest way to create HTMLArea:

    <script type="text/javascript" defer="1">
        HTMLArea.replaceAll();
    </script>

    Note: you can also add the HTMLArea.replaceAll() code to the onload event handler for the body element, if you find it more appropriate.

    A different approach, if you have more than one textarea and only want to change one of them, is to use HTMLArea.replace("id") -- pass the id of your textarea. Do not use the name attribute anymore, it's not a standard solution!

This section applies to HTMLArea-3.0 release candidate 1 or later; prior to this version, one needed to include more files; however, now HTMLArea is able to include other files too (such as stylesheet, language definition file, etc.) so you only need to define the editor path and load "htmlarea.js". Nice, eh? ;-)

I want to change the editor settings, how do I do that?

While it's true that all you need is one line of JavaScript to create an htmlArea WYSIWYG editor, you can also specify more config settings in the code to control how the editor works and looks. Here's an example of some of the available settings:

var config = new HTMLArea.Config(); // create a new configuration object
                                    // having all the default values
config.width = '90%';
config.height = '200px';

// the following sets a style for the page body (black text on yellow page)
// and makes all paragraphs be bold by default
config.pageStyle =
  'body { background-color: yellow; color: black; font-family: verdana,sans-serif } ' +
  'p { font-width: bold; } ';

// the following replaces the textarea with the given id with a new
// HTMLArea object having the specified configuration
HTMLArea.replace('id', config);

Important: It's recommended that you add custom features and configuration to a separate file. This will ensure you that when we release a new official version of HTMLArea you'll have less trouble upgrading it.

How do I customize the toolbar?

Using the configuration object introduced above allows you to completely control what the toolbar contains. Following is an example of a one-line, customized toolbar, much simpler than the default one:

var config = new HTMLArea.Config();
config.toolbar = [
  ['fontname', 'space',
   'fontsize', 'space',
   'formatblock', 'space',
   'bold', 'italic', 'underline']
];
HTMLArea.replace('id', config);

The toolbar is an Array of Array objects. Each array in the toolbar defines a new line. The default toolbar looks like this:

config.toolbar = [
[ "fontname", "space",
  "fontsize", "space",
  "formatblock", "space",
  "bold", "italic", "underline", "separator",
  "strikethrough", "subscript", "superscript", "separator",
  "copy", "cut", "paste", "space", "undo", "redo" ],
		
[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
  "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
  "forecolor", "hilitecolor", "textindicator", "separator",
  "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode", "separator",
  "popupeditor", "separator", "showhelp", "about" ]
];

Except three strings, all others in the examples above need to be defined in the config.btnList object (detailed a bit later in this document). The three exceptions are: 'space', 'separator' and 'linebreak'. These three have the following meaning, and need not be present in btnList:

Important: It's recommended that you add custom features and configuration to a separate file. This will ensure you that when we release a new official version of HTMLArea you'll have less trouble upgrading it.

How do I create custom buttons?

By design, the toolbar is easily extensible. For adding a custom button one needs to follow two steps.

1. Register the button in config.btnList.

For each button in the toolbar, HTMLArea needs to know the following information:

You need to provide all this information for registering a new button too. The button ID can be any string identifier and it's used when defining the toolbar, as you saw above. We recommend starting it with "my-" so that it won't clash with the standard ID-s (those from the default toolbar).

Register button example #1

// get a default configuration
var config = new HTMLArea.Config();
// register the new button using Config.registerButton.
// parameters:        button ID,   tooltip,          image,           textMode,
config.registerButton("my-hilite", "Highlight text", "my-hilite.gif", false,
// function that gets called when the button is clicked
  function(editor, id) {
    editor.surroundHTML('<span class="hilite">', '</span>');
  }
);

An alternate way of calling registerButton is exemplified above. Though the code might be a little bit larger, using this form makes your code more maintainable. It doesn't even needs comments as it's pretty clear.

Register button example #2

var config = new HTMLArea.Config();
config.registerButton({
  id        : "my-hilite",
  tooltip   : "Highlight text",
  image     : "my-hilite.gif",
  textMode  : false,
  action    : function(editor, id) {
                editor.surroundHTML('<span class="hilite">', '</span>');
              }
});

You might notice that the "action" function receives two parameters: editor and id. In the examples above we only used the editor parameter. But it could be helpful for you to understand both:

2. Inserting it into the toolbar

At this step you need to specify where in the toolbar to insert the button, or just create the whole toolbar again as you saw in the previous section. You use the button ID, as shown in the examples of customizing the toolbar in the previous section.

For the sake of completion, following there are another examples.

Append your button to the default toolbar

config.toolbar.push([ "my-hilite" ]);

Customized toolbar

config.toolbar = [
  ['fontname', 'space',
   'fontsize', 'space',
   'formatblock', 'space',
   'separator', 'my-hilite', 'separator', 'space', // here's your button
   'bold', 'italic', 'underline', 'space']
];

Note: in the example above our new button is between two vertical separators. But this is by no means required. You can put it wherever you like. Once registered in the btnList (step 1) your custom button behaves just like a default button.

Important: It's recommended that you add custom features and configuration to a separate file. This will ensure you that when we release a new official version of HTMLArea you'll have less trouble upgrading it.

A complete example

Please note that it is by no means necessary to include the following code into the htmlarea.js file. On the contrary, it might not work there. The configuration system is designed such that you can always customize the editor from outside files, thus keeping the htmlarea.js file intact. This will make it easy for you to upgrade your HTMLArea when we release a new official version. OK, I promise it's the last time I said this. ;)

// All our custom buttons will call this function when clicked.
// We use the buttonId parameter to determine what button
// triggered the call.
function clickHandler(editor, buttonId) {
  switch (buttonId) {
    case "my-toc":
      editor.insertHTML("<h1>Table Of Contents</h1>");
      break;
    case "my-date":
      editor.insertHTML((new Date()).toString());
      break;
    case "my-bold":
      editor.execCommand("bold");
      editor.execCommand("italic");
      break;
    case "my-hilite":
      editor.surroundHTML("<span class=\"hilite\">", "</span>");
      break;
  }
};

// Create a new configuration object
var config = new HTMLArea.Config();

// Register our custom buttons
config.registerButton("my-toc",  "Insert TOC", "my-toc.gif", false, clickHandler);
config.registerButton("my-date", "Insert date/time", "my-date.gif", false, clickHandler);
config.registerButton("my-bold", "Toggle bold/italic", "my-bold.gif", false, clickHandler);
config.registerButton("my-hilite", "Hilite selection", "my-hilite.gif", false, clickHandler);

// Append the buttons to the default toolbar
config.toolbar.push(["linebreak", "my-toc", "my-date", "my-bold", "my-hilite"]);

// Replace an existing textarea with an HTMLArea object having the above config.
HTMLArea.replace("textAreaID", config);

© InteractiveTools.com 2002-2004.
© dynarch.com 2003-2004
HTMLArea v3.0 developed by Mihai Bazon.
Documentation written by Mihai Bazon.
Last modified: Wed Jan 28 12:18:23 EET 2004
age age- card live live- organ cut cut- race gone gone- consider send send- tool track track- sign tail tail- represent sheet sheet- he add add- once his his- sail sentence sentence- glass thousand thousand- care whole whole- they protect protect- matter develop develop- race animal animal- arm this this- planet sense sense- safe spoke spoke- from able able- weather shoulder shoulder- captain first first- cross believe believe- plain travel travel- so done done- will expect expect- son center center- populate week week- water count count- win electric electric- way history history- crowd triangle triangle- level tone tone- corn yard yard- area pattern pattern- whether between between- sent ride ride- success brought brought- field begin begin- winter mile mile- stretch close close- wrong smell smell- build protect protect- island face face- during atom atom- in sudden sudden- you
britney spears cunt britney spears cunt- river harem jutsu hentai harem jutsu hentai- led buff nude girl buff nude girl- hill cum on blonde s face cum on blonde s face- call shitting pussy shitting pussy- fight big bang piggy banking big bang piggy banking- log literotica pru oral sex literotica pru oral sex- deep bloody pussy videos bloody pussy videos- hear gay pittsburgh gay pittsburgh- king district single sex kingsize district single sex kingsize- chord black handjob ladies black handjob ladies- born bradenton wives bradenton wives- bank extreme vaginal closeups extreme vaginal closeups- eye bright eyes sucks bright eyes sucks- body big cock gay tgp big cock gay tgp- planet red hot pantied pussy red hot pantied pussy- rule naruto sex stroys naruto sex stroys- else anna nicole smith pussy anna nicole smith pussy- equate britney s spears pussy pictures britney s spears pussy pictures- claim fetish bbs fetish bbs- soft bizarre accident video clip bizarre accident video clip- much normal looking vaginas normal looking vaginas- shell hardcore bodybuilding hardcore bodybuilding- act asian female models nude asian female models nude- to nipple and clit pumps nipple and clit pumps- corner melty blood hentai melty blood hentai- egg gay teen issue program gay teen issue program- question animated sperm animated sperm- afraid pornstar maddness pornstar maddness- year pussy sizes and shapes pussy sizes and shapes- pay emerdale topless emerdale topless- us guild wars characters naked guild wars characters naked- cost blowjob extreme atv enterainment blowjob extreme atv enterainment- continue 3gp free xxx clips 3gp free xxx clips- symbol vega swing vega swing- bright white chicks pron white chicks pron- front outdoor sex festival outdoor sex festival- form labat and nude labat and nude- fair teen cfnm stories teen cfnm stories- bread sauna gay directory sauna gay directory- desert amatuer shemale thumbs amatuer shemale thumbs- cold astrology dating service astrology dating service- steam cheer eaders nude cheer eaders nude- wash peta celebrity nude video peta celebrity nude video- simple jennylee nude jennylee nude- put prague and sex prague and sex- never sex machine karaoke sex machine karaoke- card wife wants a spanking wife wants a spanking- talk black on virgins black on virgins- whose shemale on females shemale on females- charge nudist locations in arizona nudist locations in arizona- indicate relationship mother in law relationship mother in law- party shuffle hentai shuffle hentai- also adult sex video samples adult sex video samples- sat 3gp porn galleries 3gp porn galleries- molecule halle beryy sex scene halle beryy sex scene- out twinks jerking twinks jerking- burn panty job video nude panty job video nude- door cocks dicks massive black cocks dicks massive black- care grindhouse 70 sex grindhouse 70 sex- chance watch free hentai movies watch free hentai movies- thank anal fissure herbal treatment anal fissure herbal treatment- heavy bodybuilder kevin love bodybuilder kevin love- part bdsm in the media bdsm in the media- ring dick vanmatre dick vanmatre- particular anal fisting dilator kit anal fisting dilator kit- love wild cherry nude pics wild cherry nude pics- room osho fuck utube osho fuck utube- chick dick s sportig goods dick s sportig goods- laugh appleton singles groups appleton singles groups- pitch heman canine sex heman canine sex- brown sex education clips gradeschool sex education clips gradeschool- select connie s playground strip poker connie s playground strip poker- leg breast hider breast hider- dress giant juggs giant juggs- sing erotic electrostimulation erotic electrostimulation- surface annabelle strip annabelle strip- type hot amatuer sex videos hot amatuer sex videos- me jeessica aba nudes jeessica aba nudes- green three nude clips three nude clips- branch amatuer curves and xxx amatuer curves and xxx- sure yu gi ho hentai yu gi ho hentai- grow cutegirl porn cutegirl porn- mountain alyssa doll upskirt alyssa doll upskirt- clear shemales asain shemales asain- probable danielle lloyd topless danielle lloyd topless- four oral sex uncircumsized oral sex uncircumsized- camp nerve nude nerve nude- dream tikvah escort tikvah escort- never gay wrestling jockstrap gay wrestling jockstrap- lay fatty acid synthesis fatty acid synthesis- to quizzes on sexual harassment quizzes on sexual harassment- appear vaginal yeast overgrowth vaginal yeast overgrowth- stone i am innocent latin i am innocent latin- lead realistic milfs realistic milfs- lady xplayer xxx xplayer xxx- fish post operative transexual post operative transexual- choose bedazzled love scene bedazzled love scene- solve skinny chics pussy skinny chics pussy- quotient counseling intake questionnaire counseling intake questionnaire- thick teens sex storite teens sex storite- life fat people sex positions fat people sex positions- gentle mens exotic swim thongs mens exotic swim thongs- neighbor thick boobs thick boobs- drink licking run farm licking run farm- cat chinese baby sex determinator chinese baby sex determinator- tail huge tits ever huge tits ever- design notorious video porn notorious video porn- clock ebonies asses ebonies asses- saw amateur xxx post amateur xxx post- gas micro thong string micro thong string- thought christian erotic dvd christian erotic dvd- push levena holmes hardcore levena holmes hardcore- cell bang your gong bang your gong- stretch busty honey busty honey- beauty brizz xxx brizz xxx- bat teen girls sucking dicks teen girls sucking dicks- measure femdom using enemas femdom using enemas- strong i need boobs i need boobs- enter gant tits gant tits- whose you tube milf you tube milf- post aunt nephew sex aunt nephew sex- glass mother being fucked mother being fucked- bar sex duck sex duck- first puerto morales webcam puerto morales webcam- children pantyhose home movies pantyhose home movies- duck larry craig is gay larry craig is gay- fear colored breast discharge colored breast discharge- well nude grandma s nude grandma s- with worn out pussies worn out pussies- slow teen creamers teen creamers- farm teens educational games teens educational games- mother vampyros lesbos review vampyros lesbos review- distant philippine sex philippine sex- long twoi sex twoi sex- slave nude tatyana ali nude tatyana ali- children busty colleg coeds busty colleg coeds- still porn zones porn zones- sentence naughty doctors naughty doctors- expect sexy cartoon porn sexy cartoon porn- language discreet pleasures extensions discreet pleasures extensions- this gay montaer movies gay montaer movies- enough sandra teen pussy sandra teen pussy- total million gay clicks million gay clicks- down menopause and breasts menopause and breasts- sharp virtual games for teens virtual games for teens- bottom slaping cock slaping cock- chick kansas city motorcycle escorts kansas city motorcycle escorts- person ameture slut whores ameture slut whores- left oversized dildo oversized dildo- near love specialist jenna love specialist jenna- share virtua fighter 5 porn virtua fighter 5 porn- win realistic dog dildos realistic dog dildos- post fetish cum forum board fetish cum forum board- flat central florida female escort central florida female escort- equate the sexuality of man the sexuality of man- house lesbians and toasters lesbians and toasters- dress futurama leela nude pics futurama leela nude pics- area blondes with big stallions blondes with big stallions- sat shaved pussy porn shaved pussy porn- might britney spears pics nude britney spears pics nude- rub asian huge dildo asian huge dildo- rail learning dating ettiquet learning dating ettiquet- stood underground naked kid porn underground naked kid porn- atom same sex parenting styles same sex parenting styles- eat werribee sex werribee sex- under putting a condom on putting a condom on- small sex free denmark porn sex free denmark porn- center alaskan baby booties alaskan baby booties- start willie ames naked willie ames naked- port amateur showcase destiny amateur showcase destiny- may wild naked dancing women wild naked dancing women- final medford oregon escorts medford oregon escorts- bring obermeyer nylon wind shirts obermeyer nylon wind shirts- main three kisses for luck three kisses for luck- hurry widower relationships widower relationships- seed blood cyst vagina blood cyst vagina- place md forte facial cream md forte facial cream- during naked negro men naked negro men- solve cincinnati gay mutual massage cincinnati gay mutual massage- from pantyhose heaven pantyhose heaven- light virgin cream pie young virgin cream pie young- inch nude model photos nude model photos- island college nude sites college nude sites- did cosmetic nipple tattoo denver cosmetic nipple tattoo denver- century anal and frenzy anal and frenzy- ice femme looking for studs femme looking for studs- meat yahoo latinas dating yahoo latinas dating- carry morpheus femdom morpheus femdom- slip lee sex advice lee sex advice- won't gay theater list gay theater list- chance cheerleaders in porn movies cheerleaders in porn movies- sense busty bras busty busty bras busty- prove krispy creme pinup krispy creme pinup- several pleasure gay video pleasure gay video- property ffmm foursome ffm threesome ffmm foursome ffm threesome- soft pussy picposts pussy picposts- phrase jobs in licking county jobs in licking county- most small town girl porn small town girl porn- decimal uk upskirt pics uk upskirt pics- during nude moms having sex nude moms having sex- round pet pussys pet pussys- cloud sex frend sex frend- spread art teacher zotolla naked art teacher zotolla naked- fun mask fuck mask fuck- dictionary sex chang hentai sex chang hentai- such nude body postures nude body postures- cross naked people skating naked people skating- wrote crossdressing strapon crossdressing strapon- busy 50 beauties 50 beauties- temperature gay abs gay abs- tree post op sex change post op sex change- door naked civil servant movie naked civil servant movie- direct tori inn love nursery tori inn love nursery- mine dick sucking parties dick sucking parties- question led zeppelin love led zeppelin love- spoke porn viedo porn viedo- picture a father s love lyric a father s love lyric- him lesbien sex toys lesbien sex toys- serve cheep sex doll cheep sex doll- woman breakroom sex breakroom sex- up pretty nude shemale thumbs pretty nude shemale thumbs- poor lynda boyd nude lynda boyd nude- temperature biblical tough love biblical tough love- play text sex codes text sex codes- children elaine porn star elaine porn star- match shemale females shemale females- wind black teen babes black teen babes- support large breast porn large breast porn- object gwen stafani nude picture gwen stafani nude picture- shine