implementing equation editor in posts in claroline
implementing equation editor in posts in claroline
Can somebody help me do this? Thanks.
31 Mar 08, 7:18PM
Hi,
Claroline from (I assume) http://www.claroline.net/
uses the Tiny MCE editor. I've no direct experience of writing plugins for this, but it doesn't look too complex. Perhaps you can look at some of the example plugins on http://tinymce.moxiecode.com/
and adapt them.
I am planning to write a plugin for this (if nobody else does), but I won't have the time to do this for a few weeks. Hope this helps.
31 Mar 08, 8:08PM
Also look at:
http://sourceforge.net/tracker/index.php?unc=detail&aid=1509758&group_id=103281&atid=738747
I think this has the basis of everything that is needed.
I've not tested this, but having launched the editor (i.e. equationeditor.php) in the appropriate way from TinyMCE, you will possibly just need to replace the FCKEditor code in the javascript at the front with:
var text=getEquationStr(); text = '<img src="<?php echo(EQUATIONENGINE); ?>?'+escape(text)+'" />'; tinyMCE.execCommand('mceInsertContent', false, text);That should at least get the equation image into the editor. Ideally what we then need to do is enable TinyMCE editor to somehow allow images of this form to be double clicked and edited, by relaunching the equation editor with the old equation. Probably a lot tricker.
1 Apr 08, 11:18AM
Hi! Thanks for the reply.
Claroline have mimetex implemented inside. So I think it will not be complicated, if we put some other button, with text "Insert". So I just need the code. I don't need the Render button. I think this will be very easy, just few lines of code...
1 Apr 08, 4:59PM
Hi. Rendering the image is not the main issue: the image tag generated by CodeCogs equation editor will create the equations you need (with better quality than mimetex btw).
The work we need to do is:
1) Add a button to the TinyCME toolbar to launch the editor
2) Get the equation back into the text within your edit.
3) An ideally, make it so you can double click on a equation within the editor and relaunch the equation editor.
I'm fairly certain my previous post above covers the bits to solve the first 2 issues. (3) is harder.
As I said, if you can be patient I'll try to find time to write this addin and create a like demo!
Cheers.
1 Apr 08, 6:42PM
Ok, thank you very much. I'll be patient, as much as need. Thanks again.
11 Apr 08, 7:12PM
will can you inform me please, if you have started and tried something... Thank you...
14 Apr 08, 12:02PM
Yes I have started. It works in part as I would want, but I want to also find a way of editing existing equations without having to rewrite them. Too busy with work for the next few days, but perhaps at the end of the week I'll find some time.
30 Apr 08, 8:13PM
will, have you finished it? Have you test it?
Regards.
30 Apr 08, 9:13PM
Sorry. I'm working on this in any spare time I get.
I've been away on business the whole of the last week and again at the beginning of next week.
I'll try to grab some time Saturday to complete the work and put up a demo page. I'll post back here when I'm done.
Thanks for your patience.
Login