mirror of
https://github.com/heyman/heynote.git
synced 2025-06-25 03:51:26 +02:00
Override default highlighting style to remove ugly underline on heading tags
This commit is contained in:
parent
0d7c04991f
commit
3aa9e5d512
@ -1,6 +1,9 @@
|
|||||||
import { EditorView } from "@codemirror/view";
|
import { EditorView } from "@codemirror/view";
|
||||||
|
import { HighlightStyle, syntaxHighlighting, defaultHighlightStyle } from '@codemirror/language';
|
||||||
|
import { tags } from '@lezer/highlight';
|
||||||
|
|
||||||
export const heynoteLight = EditorView.theme({
|
|
||||||
|
const lightTheme = EditorView.theme({
|
||||||
"&": {
|
"&": {
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
},
|
},
|
||||||
@ -37,4 +40,16 @@ export const heynoteLight = EditorView.theme({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const highlightStyle = HighlightStyle.define([
|
||||||
|
...defaultHighlightStyle.specs,
|
||||||
|
|
||||||
|
// override heading style, in order to remove the ugly underline
|
||||||
|
{ tag: tags.heading, fontWeight: 'bold'},
|
||||||
|
])
|
||||||
|
|
||||||
|
const heynoteLight = [
|
||||||
|
lightTheme,
|
||||||
|
syntaxHighlighting(highlightStyle),
|
||||||
|
];
|
||||||
|
|
||||||
|
export { heynoteLight };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user