feat: add link extension support and styling to editor components

This commit is contained in:
swve 2025-04-17 15:25:29 +02:00
parent 1350cb7354
commit e6d7e881e3
7 changed files with 297 additions and 5 deletions

View file

@ -32,6 +32,7 @@ import TableHeader from '@tiptap/extension-table-header'
import TableRow from '@tiptap/extension-table-row'
import TableCell from '@tiptap/extension-table-cell'
import UserBlock from '@components/Objects/Editor/Extensions/Users/UserBlock'
import { getLinkExtension } from '@components/Objects/Editor/EditorConf'
interface Editor {
content: string
@ -112,6 +113,7 @@ function Canva(props: Editor) {
Table.configure({
resizable: true,
}),
getLinkExtension(),
TableRow,
TableHeader,
TableCell,
@ -194,6 +196,19 @@ const CanvaWrapper = styled.div`
margin-bottom: 10px;
}
// Link styling
a {
color: #2563eb;
text-decoration: underline;
cursor: pointer;
transition: color 0.2s ease;
&:hover {
color: #1d4ed8;
text-decoration: none;
}
}
ul,
ol {
padding: 0 1rem;