在适当的元素上发送密钥很重要。就我而言,经过一些实验,那是:
<div class="redactor_text redactor_optional redactor_redactor redactor_editor" contenteditable="true" dir="ltr" style="min-height: 120px;"></div>
编辑器是用这个 html 定义的:
<div class="redactor_box"><ul class="redactor_toolbar" id="redactor_toolbar_0"><li><a href="javascript:;" title="Bold" tabindex="-1" class="re-icon re-bold"></a></li><li><a href="javascript:;" title="Italic" tabindex="-1" class="re-icon re-italic"></a></li><li><a href="javascript:;" title="Underline" tabindex="-1" class="re-icon re-underline"></a></li><li><a href="javascript:;" title="Link" tabindex="-1" class="re-icon re-link"></a></li><li><a href="javascript:;" title="Superscript" tabindex="-1" class="re-icon re-superscript fa-redactor-btn"><i class="fa icon-superscript"></i></a></li><li><a href="javascript:;" title="Subscript" tabindex="-1" class="re-icon re-subscript fa-redactor-btn"><i class="fa icon-subscript"></i></a></li></ul><div class="redactor_text redactor_optional redactor_redactor redactor_editor" contenteditable="true" dir="ltr" style="min-height: 120px;"></div><textarea class="text optional redactor" data-limit="450" data-persist="garlic" data-min-height="120" name="lesson[intro]" id="lesson_intro" dir="ltr" style="display: none;"></textarea></div>