We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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",
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Drag Handle is not shown in the documentation.
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' });
}, [])
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",
The text was updated successfully, but these errors were encountered: