Skip to content

Custom Integrations

cvasseng edited this page Sep 5, 2016 · 2 revisions

To integrate the Highcharts Editor into your own project, either the full editor or the overlay editor needs to be instantiated and attached to a DOM node in your application.

The basic flow is as such for the modal editor:

someSystem.addPlugin(function () {
    //Create a modal editor
    var modal = highed.ModalEditor('node-to-attach-to', {

                },
                function (html) {
                    //This is called when the chart editing is done
                }
    );
}); 

Similarly, the flow when using the full editor is as such:

    var editor = highed.Editor('node-to-attach-to');

    editor.on('ChartChange', function () {
        //Call editor.getEmbeddableHTML/SVG/JSON to get the new chart state.
    });

A good place to start is to look at the source code for the included TinyMCE integration.