- Download TinyMCE tinymce_3_x_x.zip, it contains all you need for any editor.
- Unzip and extract the
tinymce_3_x_x.zipmove the subdir
tinymceto your desired local location.
- Upload tinymce directory to your server with all it's contents.
- Now create a simple test web page with code as below, upload to server, that's all, it should work.
<body> <form> <textarea name="content" cols="50" rows="15" > This is some content that will be editable with TinyMCE. </textarea> </form> </body>
See an example of a simple form and in a few hours of experimentation you will have a form like this, as all the files have been uploaded.
Further more comprehensive instructions can be found on Installation, which you can move on to when you have mastered the Dummies version! If you are not a Dummy don't edit, as us Dummies like simple instructions!
OK so let's move on to become a more advanced Dummy.
- Take your example above
Now start experimenting, so open Full Featured Example and "view source", add feature and buttons which you like. You will also have downloaded this file so it should be in your
tinymce/examples/full1.html, open in your editor, so you can see the source, just copy and paste the bits you like.
It is also a good time to start looking at the Wiki in depth.
A few things to note:
- Plugins are required for buttons that do more than a simple function.
- Omit the trailing comma on the last line of the init code.
- A common error when code is added is not replacing the comma after the original init code, so you have two commas omitted.
- Resizing can be problematic, read the forum on this, there is a bug somewhere.
If you can do the following then you have a pretty good grasp of the fundamentals:
- Incorporate a date button into the editor, then change its format !
- Change the skin colour of the editor.
Read more about compressors for PHP here.
Posting data with PHP
You will need in php to incorporate stripslashes("$textarea"); code, if it has been configured in your server, which it is likely.
See more on removing slashes here on posting with php, it is something you need to get your head around, else your posted code just won't work!
The result of posting to data/file of the following:
This is your text.
Without stripping the slashes will be:
echo($_POST['content']); <span style=\"color:#ff0000\">yourText</span>
While incorporating the stripslashes("$textarea"); php code will be:
echo(stripslashes($_POST['content'])); <span style="color:#ff0000">yourText</span>
\ is stripped.
Thanks for the feedback!