admin
Guest
|
 |
« on: December 06, 2009, 11:55: AM » |
|
The FCK Editor is a great tool where is falls down is in it's documentation and the total lack of good installation guide. You can find bits and pieces if you search the internet long enough but nothing solid is available.
This is an attempt to give some basic installation instruction to a mid level programmer on a Linux server.
The first thing you need to do is obviously upload the fckeditor directory to your server
Next on the form page you want to use the editor include this above the heading section of the page
<?php include("fckeditor/fckeditor.php") ;?> <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
Change it to fit where you uploaded the editor to.
Next - and this is where good documentation would be helpful - you need to set up the field that will be used and you need to include this code below where you placed the above include codes:
<script type="text/javascript"> window.onload = function() { var sBasePath = "/admin/form/fckeditor/"; var oFCKeditor = new FCKeditor( 'page_text' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = "800px"; oFCKeditor.Width = "720px"; var sSkinPath = sBasePath + 'editor/skins/silver/' ; oFCKeditor.Config['SkinPath'] = sSkinPath ; oFCKeditor.Config['PreloadImages'] = sSkinPath + 'images/toolbar.start.gif' + ';' + sSkinPath + 'images/toolbar.end.gif' + ';' + sSkinPath + 'images/toolbar.bg.gif' + ';' + sSkinPath + 'images/toolbar.buttonarrow.gif' ; oFCKeditor.ReplaceTextarea() ; } </script>
The Black areas are what you'll need to change depending on your location of the editor and the field you want the editor to work with.
And that's it.
You can also change the Height and Width to suit your forms need as well as the skin you want to use for the editor is self.
Let us know if you find this helpful
|