I would like to know how to pass the wp_editor into variables with out directly echoing. Right now am using
function fed_get_wp_editor( $content = '', $id, array $options = array() ) {
ob_start();
wp_editor( $content, $id, $options );
$temp = ob_get_clean();
$temp .= \_WP_Editors::enqueue_scripts();
print_footer_scripts();
$temp .= \_WP_Editors::editor_js();
return $temp;
}
to pass the wp_editor as a variable and then I will echo it when needed. Its working good in the wp-admin section but when I tried the same in Frontend of WordPress pages, then it will not work as expected.
For example usually it should print in the first position of the form field but it will print after the form fields (even outside of the form) So its very hard to handle the form submission.