Web >> Development >> Rich Text Editors >> FCKEDITOR >> How to make fckeditor replace a textarea element on a page

 

<body ....>
...
<form ....>
....
<textarea name='content' id='content'>Some existing text area content put here</textarea>
<script type='text/javascript'>
 var oFCKeditor = new FCKeditor('content');
 oFCKeditor.BasePath = \"fckeditor/\";
 oFCKeditor.Height = '500';
 oFCKeditor.ReplaceTextarea();
</script>

Note:
1.  assumes that your fckeditor scripts is in fckeditor subdirectory to the current page.
2.  textarea element name is "content", hence FCKeditor is also named "content"