Title: Pulling user profile data into a TinyMCE plugin
Last modified: August 19, 2016

---

# Pulling user profile data into a TinyMCE plugin

 *  [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [17 years ago](https://wordpress.org/support/topic/pulling-user-profile-data-into-a-tinymce-plugin/)
 * I’d like to pull information that the user sets in their profile into a TinyMCE
   plugin. Any ideas as to how this might be possible (outside of a direct database
   connection from the TinyMCE plugin)?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [17 years ago](https://wordpress.org/support/topic/pulling-user-profile-data-into-a-tinymce-plugin/#post-1087569)
 * What I’ve ended up doing is using the [SACK library that’s included with WordPress](http://codex.wordpress.org/AJAX_in_Plugins).
   The JS I include in the header of the flat HTML file within a TinyMCE plugin (
   the one that’s reserved for the dialog box). I’ve still got two problems however:
    - `die('var a = "' . $a . '";');` won’t pass the variable to my script. Having
      it die with an alert() does work, however, so I don’t know whether it’s a 
      library issue or a JS issue. Darn Javascript.
    - As far as I can tell, there’s no way to get the `$post->ID` when hooking a
      function onto wp_ajax (which is necessary because I want to call a custom 
      field).
 * Any thoughts, feedback, or violent dissent would be greatly appreciated!

Viewing 1 replies (of 1 total)

The topic ‘Pulling user profile data into a TinyMCE plugin’ is closed to new replies.

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [sack](https://wordpress.org/support/topic-tag/sack/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)
 * [user profiles](https://wordpress.org/support/topic-tag/user-profiles/)

 * 1 reply
 * 1 participant
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/pulling-user-profile-data-into-a-tinymce-plugin/#post-1087569)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
