Home

Example 3 - Export Areas

This example extend example 1, adding an Export Area. This is a region that represents the latex equation in a format suitable for use in other applications that accept mathematics. Three different exports are considered:


Selection of Export Areas

HTML:

HTML with hyperlink to edit equation, placed within a DIV layer:

Tidly Wiki

Equation URL, placed within an image element:

Equation URL:

Key HTML Code

<!DOCTYPE html>
<html lang="en">
<head>
<title>Example 3 - Embedded Installation</title>

<!-- Scripts needed by CodeCogs Equation Editor -->
<link rel="stylesheet" type="text/css" href="http://latex.codecogs.com/css/equation-embed.css" />
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/ie6.css" type="text/css"/>
<![endif]-->
<script type="text/javascript" src="http://latex.codecogs.com/js/eq_config.js" ></script>
<script type="text/javascript" src="http://latex.codecogs.com/js/eq_editor-lite-18.js" ></script>
<!-- End of Scripts needed -->

</head>
<body>
<h1>Example 3</h1>

<div id="editor"></div>
<textarea id="testbox" rows="3" cols="40"></textarea>
<img id="equation" />

<h3>Selection of Export Areas</h3>
<p>HTML:</p>
<textarea id="exportarea1" rows="3" cols="40"></textarea>

<p>HTML with hyperlink to edit equation, placed within a DIV layer:</p>
<div id="exportarea2"></div>

<p>Tidly Wiki</p>
<textarea id="exportarea3" rows="3" cols="40"></textarea>

<p>Equation URL, placed within an image element:</p>
<img id="exportarea4"/>

<p>Equation URL:</p>
<textarea id="exportarea5" rows="3" cols="40"></textarea>

<script type="text/javascript">
EqEditor.embed('editor','');

var a=new EqTextArea('equation', 'testbox');
EqEditor.add(a,false);

a.addExportArea('exportarea1','html');
a.addExportArea('exportarea3','tw');
a.addExportArea('exportarea4','url');
a.addExportArea('exportarea5','url');
</script>


</body>
</html>

© 2004-2013 www.CodeCogs.com, Zyba Ltd.