cscan / vue3-excel-editor

Vue3 plugin for displaying and editing the array-of-object in Excel style.
MIT License
231 stars 51 forks source link

Background Color #41

Closed Jmuzu closed 4 months ago

Jmuzu commented 4 months ago

How can i change the background color of this? trying using tailwind css class but doesn't work only text colors

cscan commented 4 months ago

Did you try cellStyle( )?

Jmuzu commented 4 months ago

Not yet is there an example how to do it? I can't see it in the docs. thank you.

RonchettiAssociati commented 4 months ago

This works for me.

In the template:

`<vue-excel-editor v-if="!tokenHasOptions" class="editor" :cell-style="cellStyle"

`

and then in methods:

cellStyle (content) { var cellStyleObject = { 'font-size': '24px', 'text-align': 'center', 'color': 'black' } return cellStyleObject; }

Jmuzu commented 4 months ago

Will try it thank you!