shshanker
11/18/2015 - 8:37 AM

Frontend editor powered by TinyMCE

Frontend editor powered by TinyMCE

<?php
// enqueue tinymce scripts
add_action('wp_print_scripts', 'my_enqueue_scripts');

function my_enqueue_scripts() {      
        wp_enqueue_script( 'tiny_mce' );
        if (function_exists('wp_tiny_mce')) wp_tiny_mce();
}


 <textarea name="offer-description" id="offer-description" rows="4" cols="50" title="<?php _e('Indtast kursusbeskrivelse (Vedhæftes til modtageren)', 'get-smarter'); ?>"></textarea>


?>

<script>
// tinymce initiate in Frontend
jQuery(document).ready(function(){
tinyMCE.init({
        mode : "exact",
        theme : "modern", 
        /*plugins : "autolink, lists, spellchecker, style, layer, table, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, xhtmlxtras, template",*/
        elements:"offer-description",    
        
              
        menubar: "false",
        height : 150
    });


});
</script>