Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Drag Handle is not shown in the documentation? #8521

Closed
xiaogonggong-w opened this issue Oct 14, 2024 · 0 comments
Closed

The Drag Handle is not shown in the documentation? #8521

xiaogonggong-w opened this issue Oct 14, 2024 · 0 comments
Labels
mod:widget Related to positioned menus type:bug Something isn't working

Comments

@xiaogonggong-w
Copy link

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",

@doodlewind doodlewind added type:bug Something isn't working mod:widget Related to positioned menus labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod:widget Related to positioned menus type:bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants