我使用 TinyMCE 来回复邮件表格。光标应自动落在文本条目中。我使用了 auto_focus:true 但它不起作用。请帮忙。
我的代码:
<script type="text/javascript">
tinymce.init({
selector: "textarea.tmce",
theme: "modern",
auto_focus:true,
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "print preview media | forecolor backcolor emoticons",
templates: [
{title: 'Test template 1', content: 'Test 1'},
{title: 'Test template 2', content: 'Test 2'}
],
});
</script>