selection.getContent()在Chrome/TinyMCE 4.0内联编辑模式下不起作用

selection.getContent()在Chrome/TinyMCE 4.0内联编辑模式下不起作用,tinymce,tinymce-4,Tinymce,Tinymce 4,我正在尝试在TinyMCE 4.0中获取用户选择的内容。在Firefox中一切正常,但在Chrome中,selection.getContent()返回空值。 我使用的是内联TinyMCE模式(正常模式很好) 你对如何解决这个问题有什么建议吗 var selectedContent = editor.selection.getContent(); if(!selectedContent){ alert('Please select some text first!'); retu

我正在尝试在TinyMCE 4.0中获取用户选择的内容。在Firefox中一切正常,但在Chrome中,
selection.getContent()
返回空值。 我使用的是内联TinyMCE模式(正常模式很好)

你对如何解决这个问题有什么建议吗

var selectedContent = editor.selection.getContent();
if(!selectedContent){
    alert('Please select some text first!');
    return null;
}