php – ckeditor wysiwyg does not return textarea value in laravel-ThrowExceptions

Exception or error:

I’m using a ck editor in my form but it do not return the data on submitting form .i’m getting all data of other form elements except the value from ckeditor.
And i tested that field by removing the ck-editor class (as an ordinary text area) then i’m getting the value.But i need to add a ck-editor other than ordinary text area in my form.
I’m working on laravel4.

<div class="col-lg-8">
    <textarea  class="form-control txtEditor" name="auctionDescription" id="auctionDescription" > Lorem ipsum dolor sit amet, consectetur adipiscing elit............</textarea>
</div>

for testing i’m printing the values in my controller using

print_r(Input::all());

then i get result as

Array ( [_token] => tVThwNaVckCvWJChChbPleZaVdvNzAONwSjREkaA [campaignId] => 1 [auctionTitle] => Auction item 1 edited [auctionDescription] => )

ie:value of title and id entered using text box is returning but text in ck-editor is not returning.

How to solve:

You need to get the value from CK Editor instance and set it:

$( "#auctionDescription" ).val(CKEDITOR.instances.auctionDescription.getData());

Leave a Reply

Your email address will not be published. Required fields are marked *