Title: manex's Replies | WordPress.org

---

# manex

  [  ](https://wordpress.org/support/users/manex/)

 *   [Profile](https://wordpress.org/support/users/manex/)
 *   [Topics Started](https://wordpress.org/support/users/manex/topics/)
 *   [Replies Created](https://wordpress.org/support/users/manex/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/manex/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/manex/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/manex/engagements/)
 *   [Favorites](https://wordpress.org/support/users/manex/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Get post editor content from pop-up](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/)
 *  Thread Starter [manex](https://wordpress.org/support/users/manex/)
 * (@manex)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/#post-4801812)
 * Ok,thank you very much again. I will give it a try, 😀
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Get post editor content from pop-up](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/)
 *  Thread Starter [manex](https://wordpress.org/support/users/manex/)
 * (@manex)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/#post-4801780)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Get post editor content from pop-up](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/)
 *  Thread Starter [manex](https://wordpress.org/support/users/manex/)
 * (@manex)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/#post-4801777)
 * Thank you for your guidance, it was realy useful. As you said, once a draft is
   saved the content is accesible from the popup. FYI, this is how I accomplished
   it:
    1. To create the popup: Define this function for the action media_buttons to add
       the image as a button to media buttons.
    2.     ```
           function oi_itzultzaile_botoia_gehitu()
           	{
           				$urla='"'.get_bloginfo("wpurl").'/wp-content/plugins/ohar-itzultzailea/itzulpen-orria.php"';
           				$izena='"'.__("Ohar Itzultzailea","ohar-itzultzailea").'"';
       
           				echo "<img src='".get_bloginfo("wpurl")."/wp-content/plugins/ohar-itzultzailea/irudiak/itzuli-botoia.png'
           					class='thickbox'
           					alt='Itzulpena abian jartzeko erabiltzen den botoia irudikatzen duen irudia'
           					onclick='leihoaIreki($urla,$izena)' style='cursor: pointer;'/>";
       
           	}
       
           	add_action('media_buttons', 'oi_itzultzaile_botoia_gehitu',20);
           ```
       
    3. Then, in the .js file with the functions define this function to open the popup:
    4.     ```
           function leihoaIreki(urla,izena)
           {
           	window.open(urla,izena,"width=640,height=500");
           }
           ```
       
    5. In order to get the content of the editor from the popup:
        `var aux=window.opener.
       document.getElementById("content").innerHTML;`
 * With the code above I solved the problem. There is one issue, though, the pop-
   up does not follow the standard appearance of WordPress(in the previous version
   with the anchor it followed the standard appearance). I’ve tried a few things
   but I could not accomplish it, do you know how to do it?
 * Anyway, once again, thank you very much! 😀
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Get post editor content from pop-up](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/)
 *  Thread Starter [manex](https://wordpress.org/support/users/manex/)
 * (@manex)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/get-post-editor-content-from-pop-up/#post-4801714)
 * Thank you for your answer, bcworkz.
 * If I’ve understood correctly what I should do is the following:
    1. Add an action for the moment in which the post is published and open the pop-
       up in the registered function `add_action( 'publish_post','pop-up_opener');`
    2. As the post has already been published the content could be accessed from the
       pop-up window. Would something like this work? `window.parent.getElementById("
       content").innerHTML;`

Viewing 4 replies - 1 through 4 (of 4 total)