This is the archived documentation for Doka Image Editor v7.

Please visit pqina.nl/pintura/docs/ to see documentation for the latest version of Pintura Image Editor.

Can I use Doka Image Editor version 6 data with version 7?

We can convert Doka Image Editor version 6 data with the legacyDataToImageState method.

import { legacyDataToImageState } from './doka.js';

const app = openEditor({
    /* editor settings */
});

app.on('load', ({ size }) => {
    app.imageState = legacyDataToImageState(app, size, {
        /* Doka Image Editor version 6 data here */
    });
});