我正在尝试插入引号,然后将光标移动到编辑器的末尾。目前,我插入引号,光标最终在引号内,所以如果您要开始输入,用户将添加到引号中,这不是我想要发生的
我已经尝试查看他们的文档以弄清楚如何做到这一点,但我认为我引用的不是理解它
这是我当前的代码:
$(document.body).on('click', '.action.quote', function() {
var $target = $($(this).data('target'));
var editor = $('#reply-body').sceditor('instance');
var bodyText = $target.html();
editor.insert('[quote=author]' + bodyText + '[/quote]');
editor.focus();
smoothScroll('#new-comment');
});
有没有快速的方法来做到这一点?我对 SCEditor 很陌生,所以对我来说都是新的