toeverything/blocksuite

The Drag Handle is not shown in the documentation?

Closed this issue · 0 comments

The Drag Handle is not shown in the documentation.

image

When I hover my mouse over the content, the Drag Handle disappears.

import './App.css'
import { useEffect } from "react"
import { useRef } from "react"
import { Schema } from '@blocksuite/store';
import { DocCollection } from '@blocksuite/store';
import { AffineSchemas } from '@blocksuite/blocks';
import { PageEditor, AffineEditorContainer, EdgelessEditor, DocTitle } from "@blocksuite/presets";
import { effects } from '@blocksuite/presets/effects'
import { effects as blockEffects } from '@blocksuite/blocks/effects'
effects()
blockEffects()
const editor = new AffineEditorContainer()
function App() {
const editorRef = useRef(null)

useEffect(() => {
const schema = new Schema().register(AffineSchemas);
const collection = new DocCollection({ schema });
collection.meta.initialize();
const doc = collection.createDoc({ id: 'page1' });

doc.load(() => {
  const pageBlockId = doc.addBlock('affine:page', {});
  doc.addBlock('affine:surface', {}, pageBlockId);
  const noteId = doc.addBlock('affine:note', {}, pageBlockId);
  doc.addBlock('affine:paragraph', {}, noteId);
});



// title.doc = doc
// titleRef.current.appendChild(title)


editor.doc = doc
editorRef.current.appendChild(editor)

}, [])
return (
<>
<div ref={editorRef} style={{
marginInline: 300
}}>

</>

)
}

export default App

"@blocksuite/blocks": "^0.17.14",
"@blocksuite/global": "^0.17.14",
"@blocksuite/lit": "^0.13.0",
"@blocksuite/presets": "0.17.14",
"@blocksuite/store": "^0.17.14",