First, you need to add these code to function.php
/* Describe what the code snippet does so you can remember later on */
add_action('wp_head', 'enable_tiny_mce_wiris');
function enable_tiny_mce_wiris()
{
?>
<script src="<?php echo get_option('home'); ?>/wp-includes/js/tinymce/plugins/tiny_mce_wiris/integration/WIRISplugins.js?viewer=image" type="text / javascript"> </script>
<?php
};
?>
Then add this line in PHP for the quizz page. I use shortcode for my part.
wp_enqueue_editor();
Finaly add js to initialize the editor.
/* This is your custom Javascript */
(function ($) {
$(window).load(function () {
wp.editor.getDefaultSettings;
var settings = {
tinymce: {
selector: 'textarea',
plugins: 'tiny_mce_wiris',
toolbar1: 'bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,image,wp_more,tiny_mce_wiris_formulaEditor,fullscreen,',
setup: function (editor) {
editor.on('change', function () {
editor.save();
});
},
},
};
$("textarea.wpProQuiz_questionEssay").each(function (index, element) {
wp.editor.initialize($(element).attr("id"), settings);
});
});
})(jQuery);
Best regards