(New page: It might be valuable to show how to use jQuery to replace all textareas with class="fckeditor", I did it like this: <pre>jQuery(document).ready(function() { jQuery("textarea.fckeditor")...) |
Alexandern (talk | contribs) |
||
| Line 8: | Line 8: | ||
}); | }); | ||
}); | }); | ||
| − | </pre> | + | </pre> |
| − | Then my html looks like: | + | Then my html looks like: <br> |
<pre><html> | <pre><html> | ||
<head> | <head> | ||
| Line 24: | Line 24: | ||
</html> | </html> | ||
| − | </pre> | + | </pre> |
| + | A see also API would be nice towards the bottom of this page<br> | ||
| + | |||
| + | See Also : [http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API FckEditor API] | ||
Latest revision as of 23:13, 22 June 2008
It might be valuable to show how to use jQuery to replace all textareas with class="fckeditor", I did it like this:
jQuery(document).ready(function()
{
jQuery("textarea.fckeditor").each(function()
{
var fck = new FCKeditor(this.id);
fck.ReplaceTextarea();
});
});
Then my html looks like:
<html>
<head>
<script src='../js/jquery.min.js' type='text/javascript'></script>
<script src="/library/editor/FCKeditor/fckeditor.js" type="text/javascript"></script>
<script src='../js/fck-inserter.js' type='text/javascript'></script>
</head>
<body>
<form action="something" method="post">
<textarea id='myFCKeditor' name='myFCKeditor' class='fckeditor' cols="60" rows="15"></textarea>
<input type="submit" value="Save">
</form>
</body>
</html>
A see also API would be nice towards the bottom of this page
See Also : FckEditor API