1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-16 23:41:57 +03:00

Added text color mark

This commit is contained in:
Dan Brown
2022-01-12 11:02:28 +00:00
parent 717557df89
commit 1018b5627e
3 changed files with 24 additions and 1 deletions

View File

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