# Migrating from version 7

The rebrand required a rename of CSS classes, frameworks componets, custom elements, and other internal logic that used the old name. Because this release was going to be a breaking change deprecated methods have also been removed.

The overview below will show the core version 7 items with their version 8 countersparts.

## Name changes

The following name changes have been applied.

| Term              | Replacement    |
| ----------------- | -------------- |
| doka-image-editor | pintura-editor |
| DokaImageEditor   | PinturaEditor  |
| doka              | pintura        |
| Doka              | Pintura        |

The Cordova WebAPI backup script now stores the backup in `__pqina_webapi__`

## Image input element

To bring the `<image-input>` custom element in line with the rest of the library it has been renamed to `<pintura-input>`

## Removed

The following deprecated exports and methods have been removed or replaced.

### History API

The history API methods have been moved to the editor `history` property.

| Removed property | Replacement      |
| ---------------- | ---------------- |
| undo()           | history.undo()   |
| redo()           | history.redo()   |
| revert()         | history.revert() |

```js
import { openDefaultEditor } from './pintura.js';

const editor = openDefaultEditor({
    src: 'image.jpeg',
});

// run undo method on history property
editor.history.undo();
```

### Exports

| Removed export                                      | Replacement                                                                                                                          |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [imageOrienter](#imageorienter)                     | createDefaultImageOrienter()                                                                                                         |
| plugin\_annotate\_defaults                          | markup\_editor\_defaults                                                                                                             |
| plugin\_decorate\_defaults                          | markup\_editor\_defaults                                                                                                             |
| component\_shape\_editor\_locale\_en\_gb            | markup\_editor\_locale\_en\_gb                                                                                                       |
| [plugin\_crop\_defaults](#plugin%5Fcrop%5Fdefaults) | Set cropSelectPresetOptions programatically, see [plugin\_crop\_defaults](#plugin%5Fcrop%5Fdefaults) entry below for original value. |
| plugin\_resize\_defaults                            | No replacement as previously export contained empty object.                                                                          |
| plugin\_sticker\_defaults                           | No replacement as previously export contained empty object.                                                                          |

#### imageOrienter

```js
import { openDefaultEditor, createDefaultImageOrienter } from './pintura.js';

openDefaultEditor({
    src: 'image.jpeg',
    imageOrienter: createDefaultImageOrienter(),
});
```

#### plugin\_crop\_defaults

```js
import { openDefaultEditor } from './pintura.js';

openDefaultEditor({
    src: 'image.jpeg',
    cropSelectPresetOptions: [
        [
            'Crop',
            [
                [undefined, 'Custom'],
                [1, 'Square'],
                [4 / 3, 'Landscape'],
                [3 / 4, 'Portrait'],
            ],
        ],
        [
            'Size',
            [
                [[180, 180], 'Profile Picture'],
                [[1200, 600], 'Header Image'],
                [[800, 400], 'Timeline Photo'],
            ],
        ],
    ],
});
```