mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add ExternalObjects (Embeds) to editor
This commit is contained in:
parent
b1d05168b6
commit
d8be321021
7 changed files with 279 additions and 2 deletions
|
|
@ -48,6 +48,7 @@ import Collaboration from '@tiptap/extension-collaboration'
|
|||
import CollaborationCursor from '@tiptap/extension-collaboration-cursor'
|
||||
import ActiveAvatars from './ActiveAvatars'
|
||||
import { getUriWithOrg } from '@services/config/config'
|
||||
import EmbedObjects from './Extensions/EmbedObjects/EmbedObjects'
|
||||
|
||||
interface Editor {
|
||||
content: string
|
||||
|
|
@ -133,6 +134,10 @@ function Editor(props: Editor) {
|
|||
CodeBlockLowlight.configure({
|
||||
lowlight,
|
||||
}),
|
||||
EmbedObjects.configure({
|
||||
editable: true,
|
||||
activity: props.activity,
|
||||
}),
|
||||
|
||||
// Add Collaboration and CollaborationCursor only if isCollabEnabledOnThisOrg is true
|
||||
...(props.isCollabEnabledOnThisOrg ? [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue