API - CodeCogs Equation Editor (original) (raw)

The Equation Editor API (Application Programming Interface) provides a mechanism to create custom equation editor and to seamlessly integrated the editor within any HTML web page. This page show the essential steps to creating an editor tool bar, customising the panels, and interfacing with content on your page.

Prerequisites

Add to :

<script src="https://editor.codecogs.com/eqneditor.api.min.js" crossorigin="anonymous"></script>

Add to :

`

`

TextArea

constructor

Returns TextArea

addHistoryMenu

Returns TextArea

addOutput

Returns TextArea

addRestrictedCommands

Returns TextArea

addRestrictedVariables

Returns TextArea

addToolbar

Returns TextArea

callOutputs

Returns void

clear

close

getTextArea

insert

Returns void

isTextAreaEmpty

makeArrayMatrix

Returns void

makeEquationsMatrix

Returns void

notifyHistoryMenus

notifyOutputs

pushToHistory

redoHistory

setRestrictMode

Returns TextArea

setRestrictedCommands

Returns TextArea

setRestrictedVariables

Returns TextArea

undoHistory

updateMatrixDims

Returns void

validate

Returns TextArea

History

constructor

Returns History

setActiveTextArea

Returns void

Output

constructor

Returns Output

addExportArea

Returns Output

connectTextArea

Returns void

download

Returns void

exportAs

Returns string

getEquation

getEquationURL

Returns string

getExportOptions

getInline

getSupportedColors

getSupportedDpi

getSupportedFontSizes

getSupportedFonts

getSupportedFormats

setBackground

Returns Output

setDpi

Returns Output

setExportFormat

Returns Output

setFont

Returns Output

setFontSize

Returns Output

setFormat

Returns Output

setInline

Returns Output

setRenderURL

Returns Output

updateOutput

Returns Output

Toolbar

constructor

Returns Toolbar

addTextArea

Returns Toolbar

appendPanel

Returns Toolbar

getPanel

Returns HTMLDivElement

moveTo

Returns Toolbar

setActiveTextArea

Returns Toolbar

Returns Toolbar

Parameter Details

The equation editor uses some specific parameter values to modify the behaviour of certain functions. Below are the

exportType

Used throughout the Output Class to determine which format to render the equations in.

latex Raw LaTeX markup 1+sin(x)
encoded Encoded LaTeX markup 1+%20sin(x) - Uses the javascript escape function and converts '+' rto +
wp Wordpress markup [latex]1+sin(x)[/latex]
phpBB phpBB markup [tex]1+sin(x)[/tex]
tw Tiddly Wiki [img[http://latex.codecogs.com/gif.latex?1+sin(x)\]\]
url URL link to equation http://latex.codecogs.com/gif.latex?1+sin(x)
urlencoded Encoded URL link to equation http://latex.codecogs.com/gif.latex?1+sin%28x%29
pre HTML code using pre-tags
1+sin(x)
doxygen DOxygen markup \f[1+sin(x)\f]
html HTML code for use on a webpage

dpi

Stands for Dots Per Inch and is used throughout the Output Class to determine the resolution to render equations in. Note that a larger DPI often increases the size of the rendered equation as well.

50 Lowest Resolution
80
100
110
120
150
200
300 Highest Resolution