carstenschaefer / DrawerJs

A customizable WYSIWYG HTML canvas editor.
https://www.drawerjs.com
MIT License
556 stars 113 forks source link

How to set solid color as Backgrounds ! #50

Open ahmad6242 opened 4 years ago

ahmad6242 commented 4 years ago

Just wondering how can i set a background solid color. I want this feature on initialize and also after initializing the user can pick from a predefined list of colors.

pa-wesley commented 4 years ago

backgroundCss in https://github.com/carstenschaefer/DrawerJs/wiki/Appearance Is not this what you want??

ahmad6242 commented 4 years ago

I am trying to use it like this while initializing the Drawer JS, but its not working is that the right way? and if i want to change the background after init how would i do that ?

new DrawerJs.Drawer(null, {
        plugins: drawerPlugins,
        backgroundCss: 'url(' + globalURL + '/' + 'web/images/blue.png) repeat',
...MORE CODE HERE
})