Frontend API

This page details the subset of the frontend API, which is required to add the AlgebraKiT functionality to your web page. To load the frontend API include the script tag that downloads the javascript code from https://algebrakit.eu/widgets/akit-widgets.min.js. After the downloaded and executed, the frontend API is exposed by the global AlgebraKIT object.

Configuration

If you wish to set specify configuration parameter, then you should create the AlgebraKIT global yourself before the script is downloaded.

<script>
    AlgebraKIT = {
        config: {
            widgets : [{
                name: 'akit-formula-editor', 
                handwriting: 'MyScript'
            }],
            proxy: 'proxy/algebrakit',
            theme: 'my-custom-theme'
        }
    };
</script>
<!--Load API *after* setting configuration  -->
<script href="https://algebrakit.eu/akit-widgets.min.js"></script>

Parameters

widgets Optional configuration settings per widget type. See the widget overview for a list of supported widget types and their configuration parameters.
proxy If set, the widgets will communicate with AlgebraKIT’s web service through this local proxy to prevent cross-origin communication.
theme An optional identifier to a predefined theme, which defines the style and design of the widgets. Custom themes are created by the AlgebraKiT team based on your requirements.

Exposed API

The following functionality is added to AlgebraKIT:
addListener Add a listener to one of the events that are generated by AlgebraKIT widgets.
command Send a command to a specific widget instance. See widget overview for the commands that are supported by each widget type.
getWidgets Retrieve a list of all created widget instances.
injectWidgets Find any widget tags in the DOM and inject the appropriate widgets.
removeWidget Ends interaction of a widget, removes it from the DOM and performs clean up.
render Search and render expressions written in latex or MathML.
about algebrakit contact us
Contact info@algebrakit.nl
Demo +31 624827648
Privacy Policy Eindhoven, the Netherlands
Copyright AlgebraKiT 2018