How to install and configure ckeditor 3.0 is relatively simple, but this time does not involve the configuration of uploaded files, it is just a simple configuration.
Download ckeditor 3.0, address: http://ckeditor.com/
1. Download and decompress the package, and put the ckeditor folder on your site.
2. Add the following script to Your webpage:
<SCRIPT type = "text/JavaScript" src = "../ckeditor. js"> </SCRIPT>
Make sure that the configuration is correct.
3. Add the following to the location where you want to reference the ckeditor editor.Code:
<Textarea class = "ckeditor" Cols = "80" id = "editor1" name = "editor1" rows = "10">
<Java programming philosophy>
</Textarea>
Or
<Textarea Cols = "80" id = "editor1" name = "editor1" rows = "10">
<Java programming philosophy>
</Textarea>
<SCRIPT type = "text/JavaScript">
Ckeditor. Replace ('editor1 ');
</SCRIPT>
In this way, an editor can basically be used.
4. Configure your own editor and configure the config. js file (several configuration methods are provided officially. For details, refer to the official documentation) as follows:
Open the config. js file in notepad and you can see the following code:
Ckeditor. editorconfig = function (config)
{
// Define changes to default configuration here. For example:
Config. Language = 'en ';
Config. uicolor = '# f00 ';
};
You only need to add the options you need to configure in the function. For example, you can configure the options as follows:
Ckeditor. editorconfig = function (config)
{
// Define changes to default configuration here. For example:
// Config. Language = 'zh-cn'; // configure the language
// Config. uicolor = '# fff'; // background color
// Config. width = 500; // width
Config. Height = 500; // height
// Toolbar
Config. toolbar =
[
['Bold ', 'italic', 'underline', 'strike', '-', 'subscript', 'superscript'],
['Numberlist', 'bulletedlist', '-', 'outdent ', 'indent', 'blockquote'],
['Justifyleft', 'justifycenter', 'justifyright', 'justifyblock'],
['Link', 'unlink', 'anchor '],
['Image', 'flash', 'table', 'horizontalrule', 'smiley ', 'specialchar', 'pagebreak'],
'/',
['Styles ', 'format', 'font', 'fontsize'],
['Textcolor', 'bgcolor'],
['Delimiter', 'showbucket', '-', 'source', '-', 'undo ', 'redo']
];
};
for more detailed configuration options, see the official documentation http://docs.fckeditor.net/ckeditor_api/symbols/CKEDITOR.config.html