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:
@ -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;
|
Reference in New Issue
Block a user