19 lines
486 B
JavaScript
19 lines
486 B
JavaScript
function qCommentInsert(obj, id)
|
|
{
|
|
let $textarea = $('#comment-edit-text-' + id);
|
|
|
|
if ($textarea.val() === '') {
|
|
$textarea.addClass('comment-edit-text-full');
|
|
$textarea.removeClass('comment-edit-text-empty');
|
|
openMenu('comment-edit-submit-wrapper-' + id);
|
|
}
|
|
|
|
var ins = $(obj).val();
|
|
ins = ins.replace('<', '<');
|
|
ins = ins.replace('>', '>');
|
|
ins = ins.replace('&', '&');
|
|
ins = ins.replace('"', '"');
|
|
$textarea.val($textarea.val() + ins);
|
|
$(obj).val('');
|
|
}
|