Hi; as I told you I try to use gPress outside the dashboard; on a frontend tinyMCE.
I'm able to load tinyMCE with this :
require_once(ABSPATH . "wp-admin" . '/includes/post.php');
wp_tiny_mce( false , // true makes the editor "teeny"
"editor_selector" => "mceEditor"
wp_enqueue_script( 'utils.dev', get_bloginfo('wpurl').'/wp-admin/js/utils.dev.js');
And it works ! The GPress button loads; the popup loads when I click the button;
the function insertTag has this line :
window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tag);
My textarea that uses tinyMCE is not #content.
I can't give this ID because it is used in the theme css.
So the only thing missing to make that work would be that instead of using 'content', you would use a dynamic element that would be the editor.
Is it possible ?