Skip to content

Instantly share code, notes, and snippets.

View toitoit's full-sized avatar
🎩
Lurking

Damien du Toit toitoit

🎩
Lurking
View GitHub Profile
@toitoit
toitoit / gist:baf269216aae09d6b25d
Created October 6, 2015 12:33 — forked from pragmatic-web/gist:1885364
WordPress function to add the TinyMCE WYSIWYG editor to any custom field of type 'Textarea'
// important: note the priority of 99, the js needs to be placed after tinymce loads
// important: note that this assumes you're using http://wordpress.org/extend/plugins/verve-meta-boxes/
// to create the textarea - otherwise change your selector
function admin_add_wysiwyg_custom_field_textarea()
{ ?>
<script type="text/javascript">/* <![CDATA[ */
jQuery(function($){
var i=1;
$('.verve_meta_box_content textarea').each(function(e)