Home

Example 1b - Mini Editor

This example demonstrates three core elements behind a typical implimentation of the Equation Editor on a page:


Key HTML Code

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

<!-- Scripts needed by CodeCogs Equation Editor -->
<link rel="stylesheet" type="text/css" href="http://latex.codecogs.com/css/equation-embed.css" />
<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>

<style type="text/css">
#EqnEditor { text-align:left; }
</style>
</head>

<body>
<h1>Example 1</h1>

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

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

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

</body>
</html>

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