Set image editor plugins

To use the Doka Image Editor UI we first need to set the plugins available to the end user.

The following plugins are exported by the editor.

Module Description
plugin_annotate Add annotations to the image itself.
plugin_crop Rotate, flip, and crop the image.
plugin_decorate Add decorate elements to the crop selection.
plugin_finetune Adjust the image colors and add various effects.
plugin_filter Apply pre-defined filters to the image data.
plugin_sticker Add stickers to the crop selection or the image.
plugin_resize Manually adjust the output size of the image.

Register the plugins

We can register plugins using the setPlugins function.

import {
    // method used to tell Doka Image Editor which plugins are available
    setPlugins,

    // the base crop plugin
    plugin_crop,
    plugin_finetune,
    plugin_decorate,
} from './doka.js';

// here we set the available plugins
setPlugins(plugin_crop, plugin_finetune, plugin_decorate);

With our plugins registered we can now create a Doka Image Editor instance.

Next step

With our plugins loaded it's time to install the editor