我们应该为id=”添加js lib和init编辑器;“说明”;
function mysite_show_extra_profile_fields($user) {
wp_enqueue_editor();
?>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var id = \'description\';
wp.editor.initialize(id, {
tinymce: {
wpautop: true
},
quicktags: true
});
});
</script>
<?
}
add_action(\'show_user_profile\', \'mysite_show_extra_profile_fields\');