Hi egymido,
I did it by using Wiris MathType for WordPress.
https://docs.wiris.com/en/mathtype/mathtype_web/apps/wordpress
You also need to initialise wp.editor on answer pages. Using png file instead of svg.
https://codex.wordpress.org/Javascript_Reference/wp.editor
thank you renemailloux for your answer. I already installed the MathType for WordPress.
Now, would you please send me the code to initialise wp.editor on answer fields?
thank you for your time and help
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
@renemailloux Thank you for taking from your time to help me 🙂 I will try this now and will tell you the results. thank you so much
Best regards