mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add link extension support and styling to editor components
This commit is contained in:
parent
1350cb7354
commit
e6d7e881e3
7 changed files with 297 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue