mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat: improve editor + add exporting
This commit is contained in:
@@ -8,4 +8,8 @@ body {
|
||||
|
||||
.bn-container > [contenteditable="true"] {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.ProseMirror {
|
||||
background: transparent !important;
|
||||
}
|
||||
@@ -2,18 +2,16 @@ import "@blocknote/core/fonts/inter.css";
|
||||
import { useCreateBlockNote } from "@blocknote/react";
|
||||
import { BlockNoteView } from "@blocknote/mantine";
|
||||
import "@blocknote/mantine/style.css";
|
||||
//import { generateHTML } from '@tiptap/html'
|
||||
import './Editor.css'
|
||||
|
||||
|
||||
export default function Editor() {
|
||||
const editor = useCreateBlockNote({});
|
||||
|
||||
/* debounce on change to export to html */
|
||||
editor._tiptapEditor.on('update', () => {
|
||||
window.parent.postMessage({
|
||||
type: 'message-html',
|
||||
data: editor._tiptapEditor.getHTML()
|
||||
data: editor._tiptapEditor.getHTML(),
|
||||
}, '*')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user