i am trying to edit a textarea whis is ckeditor but iam facing issue if some one kown please tell me.
HTML CODE
<div class="col-md-12">
<a class="btn btn-primary pull-right" id="nextdiv">
<i class="fa fa-plus"></i>
</a>
{!! Form::label('content', __('lang_v1.content') . ':*') !!}
<div id="editor-container">
<div class="printableArea ck-editor__editable_inline">
{!! Form::textarea('content[]', null, [
'class' => 'form-control editor updateEditor',
'placeholder' => __('lang_v1.content'),
'id' => 'editor',
]) !!}
</div>
</div>
<div id="container"></div>
</div>
js code
$(“.template”).on(‘change’, function() {
$.ajax({
url: ‘/get/template/data/’ + templateId,
type: ‘GET’,
success: function(response) {
console.log(response.content)
CKEDITOR.instances[‘editor’].setData(response.content);
}
)}
}
IT GIVE THIS ERROR
TypeError: Cannot read properties of undefined (reading ‘editor’)
WHERE IS ISSUE I AM DOING