Index: lams_central/web/ckeditor/plugins/equation/images/equation.gif =================================================================== diff -u Binary files differ Index: lams_central/web/ckeditor/plugins/equation/lang/en.js =================================================================== diff -u --- lams_central/web/ckeditor/plugins/equation/lang/en.js (revision 0) +++ lams_central/web/ckeditor/plugins/equation/lang/en.js (revision e215b142c7d6806421645b25dbd5a45a23c129bc) @@ -0,0 +1,11 @@ + +CKEDITOR.plugins.setLang( 'equation', 'en', +{ + equation : + { + title : 'CodeCogs Equation Editor', + menu : 'Equation', + toolbar : 'Create Equation', + edit : 'Edit Equation', + } +}); Index: lams_central/web/ckeditor/plugins/equation/plugin.js =================================================================== diff -u --- lams_central/web/ckeditor/plugins/equation/plugin.js (revision 0) +++ lams_central/web/ckeditor/plugins/equation/plugin.js (revision e215b142c7d6806421645b25dbd5a45a23c129bc) @@ -0,0 +1,158 @@ +/* + Copyright CodeCogs 2006-2011 + Written by Will Bateman. + + Version 1: CK Editor Plugin that insert LaTeX into HTML +*/ + + + +/* +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +var currentEdit=null; + +(function() +{ + var popupEqnwin=null; + var createEqnDefinition = + { + preserveState:true, + editorFocus:false, + exec : function(editor, latex) + { + // LAMS fix; in original file was: currentEdit=CKEDITOR.currentInstance; + currentEdit=editor; + + //open a popup window when the button is clicked + if (popupEqnwin==null || popupEqnwin.closed || !popupEqnwin.location) + { + var url='http://latex.codecogs.com/editor_json3.php?type=url&editor=CKEditor'; + + //if(language!='') url+='&lang='+language; + if(latex!==undefined) + { + latex=unescape(latex); + latex=latex.replace(/\+/g,'+'); + url+='&latex='+escape(latex); + } + + popupEqnwin=window.open('','LaTexEditor','width=700,height=450,status=1,scrollbars=yes,resizable=1'); + if (!popupEqnwin.opener) popupEqnwin.opener = self; + popupEqnwin.document.open(); + popupEqnwin.document.write('