I am building a plugin for frontend submission. I am using shortcodes API to display the form for content submission, but I am having troubles.
The problem is, wp_editor echoe’s data, and shortcode should return data. When I integrate wp_editor like this:
$final_form .= wp_editor();
form does render, but not in the place but on top of the post content, where shotcode is included. Do you have any idea how would one use wp_editor in shortcode API? I don’t wan’t to bother with manually calling TinyMCE etc.
Thank you.
If a function
echo
s data, you can use php output buffering to capture theecho
ed output and return it instead