Main script include

As you have seen it before in installation and configuration, in order to make EditArea work on a webpage, you must include one external javascript file and call an init function for each textarea you want to convert. In thoses examples the file "edit_area_full.js" whas the file included, but in fact there are 5 possible files to include EditArea scripts into your webpage. All thoses files are in the same directory, and they all have advantage and inconvenient.

edit_area_full.js

This is the easier file to use for script integration. The file is nearly 100Kb length.

<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_full.js"></script>

Advantage:

Inconvient:


edit_area_compressor.php

This php file send in a gzipped file the whole core script to the brower (if the browser has not already an updated version in cache).
If the source core script files have changed, it take thoses files and merge them into one file. Then it remove all comments, white-spaces, etc... and save it in "edit_area_full.js". It also save a gzip version in "edit_area_full.gz". Then it send the gzip content to the browser (except for IE for which it is not gzipped due to IE bug with compression).

<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_compressor.php"></script>

Advantage:

Inconvient:


If you plan to use "edit_area_compressor.php" be sure that PHP scripts are allowed to write in editarea directory (at the same level than the file "edit_area_compressor.php") for disk caching.

edit_area_compressor.php?plugins

recommanded version

This include is very similar to "edit_area_compressor.php". The difference is that with "plugins" parameter, the compressor also include the main script of all the plugins in the merged file and also compress them. This will avoid later server calls for plugin main script.
In this case, the saved files are "edit_area_full_with_plugins.js" and "edit_area_full_with_plugins.gz".

<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_compressor.php?plugins"></script>

Advantage:

Inconvient:


If you plan to use "edit_area_compressor.php" be sure that PHP scripts are allowed to write in editarea directory (at the same level than the file "edit_area_compressor.php") for disk caching.

edit_area_full.gz

This is the smaller file to use for script integration. The file is gzipped and is only 20Kb length.

<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_full.gz"></script>

Advantage:

Inconvient:


edit_area_loader.js

This is the original loading script of EditArea. Use this one only if you can't use any of the 3 other loading files. There is no code epuration nor gzip compression.

<script language="javascript" type="text/javascript" src="/editarea/edit_area/edit_area_loader.js"></script>

Advantage:

Inconvient: