textarea tinymce not showing from php laravel to javascrip for searching

the code blow is showing a list of value insde tabel that admin can change … Read more textarea tinymce not showing from php laravel to javascrip for searching

the code blow is showing a list of value insde tabel that admin can change using checkbox all in same time.
before searching for value insde the tabel using ajax.
the textarea insde the tabel is showing whith tinymce but after searching its not showing the tinymce with textarea

$.each(res, function(index, value) {
  tableRow = '<tr><td><input type="checkbox" name="update[]" value="' +value.id + '"></td><td><input  type="text" name="name_' + value.id +'" class="form-control" value="' + value.name+'"></td><td><textarea id="tinymce" type="text" class="form-control" required name="description_' + value.id + '">' + value.description +'</textarea></td>'
    $('#ajaxbody').append(tableRow);
     });
<tbody id="ajaxbody">
    @foreach ($products as $product)
      <tr>
        <td><input type="checkbox" name="update[]" value="{{ $product->id }}"></td>
        <td><input type="text" name="name_{{ $product->id }}" class="form-control" value="{{ $product->name }}"></td>
        <td><textarea id="description" type="text" class="form-control tinymce" required name="description_{{ $product->id }}">{{ old('description') ?? $product->description }}</textarea></td>
      </tr>
    @endforeach
</tbody>

Source: JavaSript – Stack Overflow



Leave a Reply

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