Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
Thread: ckeditor get textarea value
05-25-2011, 05:28 PM #1
ckeditor get textarea value
Hi i used fckeditor for my textarea for my internal email and i just upgraded to ckeditor
in fckeditor i got the value of textarea (in the db)for the reply email this way
$oFCKeditor->Value = "\n\n\n>>Previous:\n$sql_array->msg_text";
$CKEditor->value = "HELLO THERE"; // hard coded to test $CKEditor->config['value'] = "hello there"; $CKEditor->Value = "hello there"; //with array val to test $CKEditor->value = "\n\n\n>>Previous:\n$sql_array->msg_text"; $CKEditor->Value = "\n\n\n>>Previous:\n$sql_array->msg_text"; $CKEditor->config['value'] = "\n\n\n>>Previous:\n$sql_array->msg_text";
$CKEditor = new CKEditor('txtMessage'); $CKEditor->basePath = '/ckeditor/'; $CKEditor->value = "\n\n\n>>Previous:\n$sql_array->msg_text"; // not loading $CKEditor->config['width'] = 510; $CKEditor->config['height'] = 400; $CKEditor->editor('txtMessage');
05-25-2011, 09:04 PM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
05-25-2011, 09:19 PM #3
- Join Date
- Feb 2011
- Your Monitor
- Thanked 546 Times in 533 Posts
This is what i used:
// Create class instance.
$CKEditor = new CKEditor();
$CKEditor->basePath = 'main/classes/ckeditor/';
$CKEditor->editor($Name, $Value);//NAme of the text area and value of it.
I can't really think of anything to write here now...
Users who have thanked tangoforce for this post:
05-25-2011, 09:50 PM #4
Not sure if its a full interface but it has a ckeditor.php that you can include to integrate it and you can add your special php stuff in there if you need to.
Thank you so much, now that i see it, it make perfect sense, i had the name set all i needed to do in that same line was set the value, makes sense now, so simple it illuded me lol.
The only change was that i put it in double quotes, works perfect.
I had the old ancient version and this all started because i was trying to do a custom menu, which in the old version (following the instructions) i never could get to work. So i decided to update, and although the new ckeditor is almost a complete rewrite and initially strange to figure out, i love it now. To get your custom menu you just put your custom menu inside the config js file which is soley designed to overwrite the default config settings, you put it in there and whalla it works perfect.Code:$CKEditor->editor('txtMessage',"\n\n\n>>Previous:\n$sql_array->msg_text");
I also like some of the other features such as it tells you what html lable your using on the bottom of your textarea ie bold, italic, blockquote whatever so you know the block your in. I like much of the new features, alot cleaner and although the documentation and support is somewhat lacking and confusing at times, i am so glad i upgraded.
Again thanks so much for your help, appreciate that.
05-26-2011, 12:52 AM #5
Ok let me ask this, i dont expect the code i just want to know the way to think of this and the avenue to go down.
if i want to do this in ckeditor
do i need to make the onkeydown part function and just call the function in my editor?Code:<textarea name="txtMessage" id="txtMessage" cols="60" rows="15" onKeyDown="limitTextarea(this.form.txtMessage,this.form.countdowntext,800);" OnKeyUp="limitTextarea(this.form.txtMessage,this.form.countdowntext,800);"></textarea>
or do i just make a new ckeditor class and say like editor onKeyDown = whatever
which way to go here? I know the syntax is not right im just asking whick path to follow in your opinion.
Update: lmao i totally forgot they have a textarea option to include. i can use that instead of the class option
like this for starters but i can adapt it.
Last edited by durangod; 05-26-2011 at 01:06 AM.
05-26-2011, 01:23 AM #6
- Join Date
- Mar 2007
- Florida, USA
- Thanked 406 Times in 398 Posts