WIP: testing bright and resume copying content

This commit is contained in:
2023-10-23 22:32:15 +11:00
parent cf0579023e
commit a607a4528e
9 changed files with 224 additions and 98 deletions

View File

@@ -0,0 +1,11 @@
import { Extension } from 'bright';
export const lineNumbers :Extension = {
name: "lineNumbers",
beforeHighlight: (props, annotations) => {
console.log(annotations);
if (annotations.length > 0 ) {
return { ...props, lineNumbers: true }
}
}
}

15
bright-extension/mark.tsx Normal file
View File

@@ -0,0 +1,15 @@
import { Extension } from "bright";
export const mark: Extension = {
name: "mark",
InlineAnnotation: ({ children, query }) => {
return (
<mark style={{ background: query }}>{children}</mark>
)
},
MultilineAnnotation: ({ children, query }) => {
return (
<div style={{ background: query }}>{children}</div>
)
},
};