mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
feat: enhance PlateEditor with MDX expression escaping and add remarkMdx support for improved markdown parsing
This commit is contained in:
parent
2d74d7bc4b
commit
648b00da64
5 changed files with 47 additions and 7 deletions
|
|
@ -8,7 +8,7 @@ import { PlateLeaf } from 'platejs/react';
|
|||
|
||||
export function HighlightLeaf(props: PlateLeafProps) {
|
||||
return (
|
||||
<PlateLeaf {...props} as="mark" className="bg-highlight/30 text-inherit">
|
||||
<PlateLeaf {...props} as="mark" className="bg-yellow-200 dark:bg-yellow-800 text-inherit">
|
||||
{props.children}
|
||||
</PlateLeaf>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export function LinkElement(props: PlateElementProps<TLinkElement>) {
|
|||
{...props}
|
||||
as="a"
|
||||
className={cn(
|
||||
'font-medium text-primary underline decoration-primary underline-offset-4'
|
||||
'font-medium text-blue-600 underline decoration-blue-600 underline-offset-4 hover:text-blue-800 dark:text-blue-400 dark:decoration-blue-400 dark:hover:text-blue-300'
|
||||
)}
|
||||
attributes={{
|
||||
...props.attributes,
|
||||
|
|
|
|||
|
|
@ -17,5 +17,13 @@ export function MarkToolbarButton({
|
|||
const state = useMarkToolbarButtonState({ clear, nodeType });
|
||||
const { props: buttonProps } = useMarkToolbarButton(state);
|
||||
|
||||
return <ToolbarButton {...props} {...buttonProps} />;
|
||||
return (
|
||||
<ToolbarButton
|
||||
{...props}
|
||||
{...buttonProps}
|
||||
onMouseDown={(e: React.MouseEvent) => {
|
||||
e.preventDefault();
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue