-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plans to support copy to clipboard (markdown code) for notes? #195 #197
Conversation
…rder-app#195 added a button to copy the markdown and added code highlighting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Left a bunch of small comments about reusing some of the exiting code.
@@ -45,18 +45,15 @@ export default function TextCard({ | |||
|
|||
return ( | |||
<> | |||
{/* TODO: Where is that used? Is it simply unused?*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the thing is, if I remove the BookmarkedTextViewer, nothing changes, so I am not quite sure what it does?
Hovering the element in the React Extension does not highlight it either and previewModalOpen is only bound to this component, nothing else, so I don't think that value can actually change?
code({ className, children, ...props }) { | ||
const match = /language-(\w+)/.exec(className ?? ""); | ||
return match ? ( | ||
// @ts-expect-error i have absolutely no idea what it complains about and passing refs to it also does not solve it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the error you're getting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types of property ref are incompatible.
Type LegacyRef<HTMLElement> | undefined is not assignable to type LegacyRef<SyntaxHighlighter> | undefined
Types of property ref are incompatible.
Type LegacyRef<HTMLElement> | undefined is not assignable to type LegacyRef<SyntaxHighlighter> | undefined
Type (instance: HTMLElement | null) => void is not assignable to type LegacyRef<SyntaxHighlighter> | undefined
Type (instance: HTMLElement | null) => void is not assignable to type (instance: SyntaxHighlighter | null) => void
Types of parameters instance and instance are incompatible.
Type SyntaxHighlighter | null is not assignable to type HTMLElement | null
Type Component<SyntaxHighlighterProps, {}, any> is missing the following properties from type HTMLElement:
accessKey, accessKeyLabel, autocapitalize, dir
, and 290 more.
…rder-app#195 Changed the copy-button to a generic one added a safeguard and a message to the copy button if copying is not possible
added a button to copy the markdown and added code highlighting
1 component seems unused
I am not sure how to test the mobile version/if that should also use the new component