Config controlsOptions not working

99 Views Asked by At

In HTML5 version can't customize transform ratios and fonts for text tool.

var editor = new PhotoEditorSDK.UI.DesktopUI({
controlsOptions: {
    transform: {
        availableRatios: [
            'imgly_transform_common_custom',
            'imgly_transform_common_square',
            'imgly_transform_common_4-3',
            'imgly_transform_common_16-9'
        ]
    },
    text: {
        replaceFonts: true,
        fonts: [
            {
                fontFamily: 'Alegreya', // The font family name, defined by Google Fonts
                variations: [
                    {
                        identifier: 'alegreya',
                        provider: 'google' // This loads the font from Google Fonts
                    }
                ]
            }
        ]
    }
}});

But nothing changed. Please help.

1

There are 1 best solutions below

0
On

Found an error, controlsOptions must be inside editor object.