mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: enhance ToolbarButtons with improved heading selection and styling
This commit is contained in:
parent
298414d57f
commit
3bc6703f33
2 changed files with 52 additions and 16 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { NodeViewWrapper } from '@tiptap/react'
|
||||
import { NodeViewProps, NodeViewWrapper } from '@tiptap/react'
|
||||
import { Node } from '@tiptap/core'
|
||||
import {
|
||||
Loader2, Video, Upload, X, HelpCircle,
|
||||
Maximize2, Minimize2, ArrowLeftRight,
|
||||
|
|
@ -133,23 +134,30 @@ interface VideoBlockObject {
|
|||
size: VideoSize
|
||||
}
|
||||
|
||||
interface VideoBlockProps {
|
||||
node: {
|
||||
attrs: {
|
||||
blockObject: VideoBlockObject | LegacyVideoBlockObject | null
|
||||
interface VideoBlockAttrs {
|
||||
blockObject: VideoBlockObject | LegacyVideoBlockObject | null
|
||||
}
|
||||
|
||||
interface VideoBlockExtension {
|
||||
options: {
|
||||
activity: {
|
||||
activity_uuid: string
|
||||
}
|
||||
}
|
||||
extension: {
|
||||
}
|
||||
|
||||
interface ExtendedNodeViewProps extends Omit<NodeViewProps, 'extension'> {
|
||||
extension: Node & {
|
||||
options: {
|
||||
activity: {
|
||||
activity_uuid: string
|
||||
}
|
||||
}
|
||||
}
|
||||
updateAttributes: (attrs: { blockObject: VideoBlockObject | null }) => void
|
||||
}
|
||||
|
||||
function VideoBlockComponent({ node, extension, updateAttributes }: VideoBlockProps) {
|
||||
function VideoBlockComponent(props: ExtendedNodeViewProps) {
|
||||
const { node, extension, updateAttributes } = props
|
||||
const org = useOrg() as Organization | null
|
||||
const course = useCourse() as Course | null
|
||||
const editorState = useEditorProvider() as EditorState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue