Index: lams_central/web/ckeditor/plugins/equation/plugin.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/ckeditor/plugins/equation/Attic/plugin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_central/web/ckeditor/plugins/equation/plugin.js 29 Dec 2011 18:10:14 -0000 1.1 @@ -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('