Open alexsilva opened 4 years ago
this is really cool. Thanks. What is the purpose of the property opts.container_id: 'editor-container' ?
what should this value be ? the id of the comments-container or a parent tag surrounding the comments container. I can see that if i comment this out it still works. Just trying to understand what is its purpose. Thanks again.
@giannik
It is the container id (div) in which the editor is rendered.
get_container: function (textarea) {
if (!textarea.data('comment_index')) {
textarea.data('comment_index', ++this.opts.comment_index);
}
return $('<div/>', {
'id': this.get_container_id(this.opts.comment_index)
});
},
ok, thanks for confirming.
I do not know is interesting for you but the need arose to use an external editor (froala) but the jquery-coments api does not provide means for that. The changes create a mini api to make it work.
The interface implementation might look something like this:
$(el).comments( comments_options );
The results were satisfactory.