mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-13 17:52:38 +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
27
surfsense_web/components/ui/equation-toolbar-button.tsx
Normal file
27
surfsense_web/components/ui/equation-toolbar-button.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import { insertInlineEquation } from '@platejs/math';
|
||||
import { RadicalIcon } from 'lucide-react';
|
||||
import { useEditorRef } from 'platejs/react';
|
||||
|
||||
import { ToolbarButton } from './toolbar';
|
||||
|
||||
export function InlineEquationToolbarButton(
|
||||
props: React.ComponentProps<typeof ToolbarButton>
|
||||
) {
|
||||
const editor = useEditorRef();
|
||||
|
||||
return (
|
||||
<ToolbarButton
|
||||
{...props}
|
||||
onClick={() => {
|
||||
insertInlineEquation(editor);
|
||||
}}
|
||||
tooltip="Mark as equation"
|
||||
>
|
||||
<RadicalIcon />
|
||||
</ToolbarButton>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue