2
我需要选择刚刚插入Froala textarea上的一段文本。以下是我试过的:在Froala上选择插入的文本
// wrapper is used to get the outerHTML
var wrapper = $('<span/>');
var content = $('<p/>', { 'class': 'schedule' });
content.html(value);
wrapper.append(content);
editor.froalaEditor('html.insert', wrapper.html());
editor.froalaEditor('selection.setAtEnd', $('.schedule')[0]);
还尝试添加一个selection.setAtStart
调用;使用markers
模块;加入selection.restore
;集中textarea和其他一些尝试,但没有任何工作。
这应该如何实现?
谢谢。