TinyMCE:Installation
From Moxiecode Documentation Wiki
Contents |
Installation instructions
Installing TinyMCE is very simple; follow the instructions here. We give a few examples of how to integrate TinyMCE. You should also take a look at the extensive options for configuration.
Requirements
TinyMCE has no direct requirements except for browser compatibility and, of course, JavaScript needs to be turned on.
There is NO back-end code distributed with TinyMCE.
TinyMCE can be setup to use textareas in an HTML form as a workspace. When the form is submitted you can have your system do something with the content of the textarea such as save the html code to a database or file. Your frontend can also be setup to read in existing content so you can make changes. Refer to Configuration Options, General, Mode for more information.
Downloading
For download instructions check our TinyMCE Website.
Extracting the archives
On Windows you could use WinZip or something similar, and on other operating systems such as Linux you simply extract the archive with the tar command. You can find an example on how to extract the archived file on Linux below.
You should extract TinyMCE in your wwwroot or site domain root folder.
Extract example using a shell
$ cd wwwroot $ gzip -d tinymce_1_44.tar.gz $ tar xvf tinymce_1_44.tar
A folder structure looking like this is created
/tinymce/ /tinymce/docs/ /tinymce/docs/zh_cn/ /tinymce/examples/ /tinymce/examples/zh_cn/ /tinymce/jscripts/ /tinymce/jscripts/tiny_mce/ /tinymce/jscripts/tiny_mce/langs/ /tinymce/jscripts/tiny_mce/plugins/ /tinymce/jscripts/tiny_mce/plugins/<plugin folders> /tinymce/jscripts/tiny_mce/themes/ /tinymce/jscripts/tiny_mce/themes/advanced/ /tinymce/jscripts/tiny_mce/themes/default/ /tinymce/jscripts/tiny_mce/themes/simple/
Making changes on your web site
Once you have extracted the archive you will need to edit the pages to include the configuration and javascript for TinyMCE. Please note that you should probably only include the TinyMCE javascript on the pages that need it, not all the pages of the web site. Remember to change the URL to the .js below to match your installation path.
The most basic page integration (converts all textarea elements into editors)
<html>
<head>
<title>TinyMCE Test</title>
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas"
});
</script>
</head>
<body>
<!-- form sends content to moxiecode's demo page -->
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
<input type="submit" value="Save" />
</form>
</body>
</html>
The Save button in this example sends the content of the textarea to the moxiecode.com site and simply displays it to you. You can create your own "submit" process and have your system write the content to a file or database.
Examples
Go here to check out the examples of different ways you can implement TinyMCE.
If you have any problems, you should check the forum on the TinyMCE web site.
