I have an inline CKeditor on my page and it works fine. It posts AJAX after its been updated, all works great.
However, in the console I get the error "Uncaught ReferenceError: CKEDITOR is not defined"
I discovered this when I was trying to modify the toolbar in the javascript, but the toolbar wasn't changing.
Any ideas what is going on here?
<div id="editor<?php echo $sub_category['id'] ?>" contenteditable="true" class="contentz ckeditor" typeID="<?php echo $sub_category['id'] ?>">
<?php if($sub_category['content']==""){ echo "Click here to add some content"; }else{ echo $sub_category['content']; } ?>
</div>
<script>
// Turn off automatic editor creation first.
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editor<?php echo $sub_category['id'] ?>');
</script>
This is called just before the body tag...
<script src="assets/js/ckeditor/ckeditor.js"></script>
<script src="assets/js/ckeditor/adapters/jquery.js"></script>
I have an inline CKeditor on my page and it works fine. It posts AJAX after its been updated, all works great.
However, in the console I get the error "Uncaught ReferenceError: CKEDITOR is not defined"
I discovered this when I was trying to modify the toolbar in the javascript, but the toolbar wasn't changing.
Any ideas what is going on here?
<div id="editor<?php echo $sub_category['id'] ?>" contenteditable="true" class="contentz ckeditor" typeID="<?php echo $sub_category['id'] ?>">
<?php if($sub_category['content']==""){ echo "Click here to add some content"; }else{ echo $sub_category['content']; } ?>
</div>
<script>
// Turn off automatic editor creation first.
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editor<?php echo $sub_category['id'] ?>');
</script>
This is called just before the body tag...
<script src="assets/js/ckeditor/ckeditor.js"></script>
<script src="assets/js/ckeditor/adapters/jquery.js"></script>
Share
Improve this question
asked Oct 14, 2015 at 11:39
user3274489user3274489
3042 gold badges5 silver badges18 bronze badges
1 Answer
Reset to default 2Move
<script>
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editor<?php echo $sub_category['id'] ?>');
</script>
after
<script src="assets/js/ckeditor/adapters/jquery.js"></script>
because you must load ckeditor.js
library first and then configure it with CKEDITOR
methods/properties