Originally Posted by
apollowilcox
Just updated the CKEditor and now this Boilerplate comments will not copy into the comments box. The editor seems to work fine, and i've re-installed the OC Boilerplate plug-in just cause. No change. Feels like something simple but I can't find it. No error logfile being created.
Can someone send me a hint? Thanks,
I've tested this by upgrading to ckeditor5 on ZC v1.5.8a. The appropriate lines of code on my install of this plugin is as folllows, with the line that gives an error in browser dev console highlighted in red.
Code:
$(document).ready(function() {
$('#predefined_comments').change(function(){
val = $(":selected", this).index();
<?php if ($editor_handler !== '') { ?>
CKEDITOR.instances['comments'].insertHtml((commentsArray[val].comment) + '<br>');
<?php } else { ?>
/* Using Plain Text Editor */
$('textarea[name="comments"]').val($('textarea[name="comments"]').val() +(commentsArray[val].comment) + '\n');
/* Use this instead of above line if you want to strip out HTML
var html_comment = $.parseHTML(commentsArray[val].comment);
var text = $(html_comment).text();
$('#comments').val($('#comments').val() +(text) + '\n');
*/
<?php } ?>
});
});
I haven't much time at the moment to debug this or compare it with the latest plugin code - so your code might be different.
Bookmarks