WIP: testing bright and resume copying content
This commit is contained in:
11
bright-extension/lineNumbers.tsx
Normal file
11
bright-extension/lineNumbers.tsx
Normal 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
15
bright-extension/mark.tsx
Normal 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>
|
||||
)
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user