samedi 13 juin 2020

Used Tinymce editor in my laravel project. but maths equations are not supported. images are not supported why?

Actually iam working with a online examination project in laravel. As it was an examination based project teachers need to store the question in database.The question is not a pure text format. the question may contain half text, half image, half maths physics equation etc. so the question is mixture of images, texts, tables, equations formulae etc. for this i need an editor to add this . when i referred in google i found tinymce is best.

So here is my doubts

1)how to integrate tinymce in my project. what i did is 

my init-tinymce.js file

tinymce.init({
    selector: 'textarea.tinymceeditor',

    plugins: ['advlist autolink lists link image charmap print preview anchor', 'searchreplace visualblocks code fullscreen', 'insertdatetime media table paste code help wordcount', ],

    external_plugins: {
        tiny_mce_wiris: 'https://www.wiris.net/demo/plugins/tiny_mce/plugin.js'
    },

    toolbar: 'tiny_mce_wiris_formulaEditor',
});

my header page

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>

<script type="text/javascript" src=""></script>

so after i done all these i can see the editor in my web form everything is fine. But i need to add the bold word, italic word, images equations everything in database for that i need to make the column anything?? means now the column is in data type

Qestion_description(LongText)

2)is this format right?? or else i need to change the question_description column data type to some other in the table??

3)ok if all everything goes to database wether it will be retrieved correctly?? else i need to do something else in my coding? means if i insert an image how it will be stored in db where it will be stored how it will be retrieved??

4)i need maths equation in my project so that i referred google and i added wiris plugin

  external_plugins: { tiny_mce_wiris: 'https://www.wiris.net/demo/plugins/tiny_mce/plugin.js' },

when i added this the formula screen appeared and i choosed few square root formula etc and it displayed correctly in the editor.

This is the equation editor

this from equation panel the equation is shifted to tinymce editor

to preview the question i have js code

 document.getElementById("desc_ques").innerHTML=tinyMCE.get('ques_desc').getContent();

this will preview the question. but while previewing the question the square root is missed why?? like wise lots of symbols are missed if i give square root of 55 just it displays only 55 why??

when i preview the quesstion the squareroots, numerator, denominator symbol everything is missing. only a few symbols are present why?

Kindly please some one answer for this 2 days iam in struggle about this editor..

1) ho to integrate a text editor in my project? 2)whether i need to change the database column into any datatype? 3)whether the mixture of question will be stored in db correctly? 4)how it is retrieved in the view form? 6) need math equation?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2YuRVaN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire