TinyMCE:Configuration

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Configuration reference

This document is the index/reference page for all available core configuration options in TinyMCE.

Configuration options

All configuration options below are to be placed within the tinyMCE.init() JavaScript call. This call will usually be made from outside of TinyMCE.

General

Callbacks

Cleanup/Output

URL

Layout

Visual aids

Undo/Redo

File lists

Tab specific

Triggers/Patches

Advanced theme

 

Initialization of TinyMCE

In order to initialize the TinyMCE the following code must be placed within HEAD element of a document. The following example is configured to convert all TEXTAREA elements into editors when the page loads. There are other modes as well.

Example of TinyMCE configuration

<html>
<head>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
	theme : "advanced",
	mode : "textareas"
});
</script>
</head>

Note: Remember to remove the last "," character in the options list.

As an alternative, the tinyMCE.init statement can be put in it's own file and referenced in a script tag:

<html>
<head>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/basic_config.js"></script>
</script>
</head>

Using this approach, you can create various configurations and reuse them in scripts as needed.

Personal tools