How to install CKeditor
12,476
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>
Author by
thomas-hiron
Updated on June 04, 2022Comments
-
thomas-hiron almost 2 years
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>
But the line below returns me this error:
Uncaught TypeError: object is not a function
var oFCKeditor1 = new CKEDITOR('message');
Any idea ?