I don't know how to install CKeditor, I downloaded the editor on the website and then put the following code between my head tags :
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor1 = new CKEDITOR('message');
oFCKeditor1.ToolbarSet = 'Basic' ;
oFCKeditor1.BasePath = "ckeditor/" ;
oFCKeditor1.ReplaceTextarea() ;
}
</script>
Uncaught TypeError: object is not a function
var oFCKeditor1 = new CKEDITOR('message');
According to the documentation, include the ckeditor.js file:
<head>
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
The editor operates on textarea
elements, so create one in your body somewhere:
<textarea id="editor1" name="editor1"><p>Initial value.</p></textarea>
Then initialize the editor with the following code after the declaration of your textarea
element:
<script type="text/javascript">
CKEDITOR.replace( 'editor1' );
</script>