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

How to pass handleDoubleClick or handleClick to an embed-linked-doc? #8465

Closed
xiaogonggong-w opened this issue Sep 25, 2024 · 1 comment
Closed
Labels
type:question Question about framework usage

Comments

@xiaogonggong-w
Copy link

I looked at the embed-linked-doc source code, which includes handleDoubleClick and handleClick, They come from this.std.getConfig('affine:embed-linked-doc'), and my question is whether there is a function like setConfig that allows me to pass functions

@L-Sun
Copy link
Contributor

L-Sun commented Oct 8, 2024

We use a extension architecture with dependency injection, and we provide a simple config extension implement in packages/affine/block-embed/src/embed-linked-doc-block/embed-linked-doc-config.ts. Here is a example:

import { EmbedLinkedDocBlockConfigExtension } from '@blocksuite/affine-block-embed';

editor.specs = [
    ...editor.specs, 
    EmbedLinkedDocBlockConfigExtension(yourConfig)
]

@doodlewind doodlewind added the type:question Question about framework usage label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Question about framework usage
Projects
Archived in project
Development

No branches or pull requests

3 participants