Hi everybody,
I'm new with ckeditor. Yesterday, I tried to use it to replace all my textarea but with no success.
The doc say to replace textarea, I need to change name or class but nothing works. If I want my textaera replaced, I have to replace Class AND Name.
So my question is, how can I replace textarea just by changing the class ?
The following code don't work:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../css/styles.css" />
<script type="text/javascript" src="../js/functions.js"></script>
<script src="../ckeditor/ckeditor.js"></script>
<title>Administration du site</title>
</head>
<body>
<textarea class="ckeditor"></textarea>
</body>
</html>
Work if I add name="ckeditor" but I don't want this.
Thanks for your help and sorry for my poor english.
Have you tried to simply
Have you tried to simply recreate the Replace by Class sample? Just see its source code in your samples folder or on the nightly build.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
The class sample seems to be
The class sample seems to be the same as my test file. They add <script src="../ckeditor/ckeditor.js"></script> on the head and just add class="ckeditor" on the textarea. The difference is just the folder, my test.php file is in a php directory:
ckeditor/
php/
So to add ckeditor.js -> src="../ckeditor/ckeditor.js", this is the only thing changed.
Ok, I found the problem ! I
Ok, I found the problem ! I don't know why but Ckeditor don't work if you don't add id="something" and name="something".
Now I try to add it to my php function...
...which is a bit strange,
...which is a bit strange, because the Replace by Class sample contains the following code:
<textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10">
And it works perfectly fine.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
can't replace by class name
<textarea class="ckeditor" cols="80" id="content" name="content" rows="10">
</textarea>
but in browser ,the textarea show "ckeditor textInput valid".