eker-huang / mathmlformula

Automatically exported from code.google.com/p/mathmlformula
0 stars 0 forks source link

Latex in Ckeditor #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is it possible to get the latex of the image being included. I have setup the 
equation editor with ckeditor and works like a charm... but I would need to 
save the latex version of the formula as well. Is there any way to send this to 
the server as long with the image or embed it in the editor?

Original issue reported on code.google.com by hernan.m...@eqip.com.ar on 5 Mar 2013 at 4:31

GoogleCodeExporter commented 8 years ago
Hi,

In javascript you have the method editor.getLaTeXFromEditor();

regards

Original comment by ionel.alexandru@gmail.com on 5 Mar 2013 at 4:39

GoogleCodeExporter commented 8 years ago
I need to convert latex form of math equation in MathMl. I'm using ckeditor. 
please help me out.

Original comment by sanchit....@meritnation.com on 23 Sep 2013 at 4:38

GoogleCodeExporter commented 8 years ago
Hi Alex,

First I want to thank you for fmath, its helps a lot in my project.

I also need latex returned from fmath rather than image.
My question is, how can I use getLatexFromEditor(). I cant find this function 
neither in editor.html nor plugin.js (from file 
fmath_formula-demo-plugin-CKEditor-v3.6.2-b1054.zip). I've done with 2 trials 
below with no success.

I try to extract mathml from editor using ed.insertHtml(mathml) ,  but its not 
shown as mathml. Do you have any idea how to get this mathml notation ?

Thanks in advance,

Regards,
Aries

-------------------------

Trial 1, editor.html
    function saveImage(editor){
                editor.insertHtml(editor.getLaTeXFromEditor()); //didnt work
                var dialog = parent.CKEDITOR.dialog.getCurrent();
        dialog.hide();
        //if(saved) return;
        //saved=true;
        //ed = editor;
        //getSWF("editML").saveImageOnServer();
    }

Trial 2, editor.html
    function getLatexFromEditor(){
        return getSWF("editML").getLaTeXFromEditor(); //didnt work
    }

    function saveAndUpdate(){
            //var mathml = getMathMLFromEditor();
                        var ltx = getLatexFromEditor();
            //var newId = parent.CKEDITOR.plugins.get('fmath_formula').addMathML(mathml);

            //ed.insertHtml("<img src='"+name+"' border='0' id='"+newId+"'/>");
            //ed.insertHtml(mathml);
                        ed.insertHtml(ltx);

            var dialog = parent.CKEDITOR.dialog.getCurrent();
            dialog.hide();

    }

Original comment by aries.wa...@gmail.com on 11 Jul 2014 at 6:47

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Alex,

Its ok, already solved. 

I've check Issue 33:    Ability to send additional parameters to server save 
script. 
and simplePage.html . Must use  getSWF('editML').getLaTeX();

Thankyou and Regards,
Aries

Original comment by aries.wa...@gmail.com on 11 Jul 2014 at 7:17

GoogleCodeExporter commented 8 years ago

Original comment by ionel.alexandru@gmail.com on 24 Nov 2014 at 7:58