How to update the value of nicEdit textarea

Hi I have a table contains a list of posts and two buttons in each post (delete and edit) .All fields get edited but I can not edit the nicEdit textarea but when I try to edit the first article's textarea it get edited here is my jquery code :

 <script type="text/javascript">
   $(function() {
     $("#myForm").submit(function() {
         new nicEditors.findEditor(;

this is my view :

         @foreach($articles as $post)


            <td><p data-placement="top" data-toggle="tooltip" title="Edit"><button class="btn btn-primary btn-xs" data-title="Edit" data-toggle="modal" data-target="#edit{{$post->id}}" ><span class="fa fa-pencil"></span></button></p></a></td></a>
            <td><p data-placement="top" data-toggle="tooltip" title="Delete"><button class="btn btn-danger btn-xs" data-title="Delete" data-toggle="modal" data-target="#delete{{$post->id}}" ><span class="fa fa-trash"></span></button></p></td>
        <div class="modal fade" id="edit{{$post->id}}" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true">
              <div class="modal-dialog">
            <div class="modal-content">
                  <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
                <h4 class="modal-title custom_align" id="Heading">Edit l'article : {{$post->id}}</h4>
              <div class="modal-body"> 
                          {!! Form::model($post,['method' => 'PATCH','files'=> true,'id'=>'myForm','route' => ['articles.update', $post->id]])!!}






Try this

$("#myForm").submit(function() {


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.