1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added bg-color mark, added color grid selectors

This commit is contained in:
Dan Brown
2022-01-12 15:33:59 +00:00
parent 1018b5627e
commit 56d7864bdf
6 changed files with 98 additions and 7 deletions

View File

@ -45,12 +45,28 @@ const text_color = {
}
};
const background_color = {
attrs: {
color: {},
},
parseDOM: [{
style: 'background-color',
getAttrs(color) {
return {color}
}
}],
toDOM(node) {
return ['span', {style: `background-color: ${node.attrs.color};`}, 0];
}
};
const marks = baseMarks.append({
underline,
strike,
superscript,
subscript,
text_color,
background_color,
});
export default marks;