mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 00:22:05 +10:00
rename color attribute
This commit is contained in:
@ -22,13 +22,13 @@ export const TableCell = TiptapTableCell.extend({
|
||||
},
|
||||
backgroundColorName: {
|
||||
default: null,
|
||||
parseHTML: (element) => element.getAttribute('data-color-name') || null,
|
||||
parseHTML: (element) => element.getAttribute('data-background-color-name') || null,
|
||||
renderHTML: (attributes) => {
|
||||
if (!attributes.backgroundColorName) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
'data-color-name': attributes.backgroundColorName.toLowerCase(),
|
||||
'data-background-color-name': attributes.backgroundColorName.toLowerCase(),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@ -22,13 +22,13 @@ export const TableHeader = TiptapTableHeader.extend({
|
||||
},
|
||||
backgroundColorName: {
|
||||
default: null,
|
||||
parseHTML: (element) => element.getAttribute('data-color-name') || null,
|
||||
parseHTML: (element) => element.getAttribute('data-background-color-name') || null,
|
||||
renderHTML: (attributes) => {
|
||||
if (!attributes.backgroundColorName) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
'data-color-name': attributes.backgroundColorName.toLowerCase(),
|
||||
'data-background-color-name': attributes.backgroundColorName.toLowerCase(),
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user