mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 10:56:24 +02:00
feat: add report content update endpoint and integrate Platejs editor for markdown editing
This commit is contained in:
parent
cb759b64fe
commit
1995fe9ec1
73 changed files with 7447 additions and 77 deletions
24
surfsense_web/components/ui/link-toolbar-button.tsx
Normal file
24
surfsense_web/components/ui/link-toolbar-button.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import {
|
||||
useLinkToolbarButton,
|
||||
useLinkToolbarButtonState,
|
||||
} from '@platejs/link/react';
|
||||
import { Link } from 'lucide-react';
|
||||
|
||||
import { ToolbarButton } from './toolbar';
|
||||
|
||||
export function LinkToolbarButton(
|
||||
props: React.ComponentProps<typeof ToolbarButton>
|
||||
) {
|
||||
const state = useLinkToolbarButtonState();
|
||||
const { props: buttonProps } = useLinkToolbarButton(state);
|
||||
|
||||
return (
|
||||
<ToolbarButton {...props} {...buttonProps} data-plate-focus tooltip="Link">
|
||||
<Link />
|
||||
</ToolbarButton>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue