Closed zhanghaidi closed 3 weeks ago
You can either create your own custom image block and add an onClick
listener there, or add a listener to the default image blocks whenever the editor updates (you can use editor.domElement.querySelector('[data-content-type="image"] img')
to get all img
elements inside image blocks).
You will have to implement this yourself as a React component and add it as a child of BlockNoteView
. The useEditorContentOrSelectionChange
and useSelectedBlocks
hooks will be useful to figure out when to show/hide your menu.
1、我如何在编辑器中上传的图片和文件进行绑定超链接功能?类似这样:
2、我需要实现自定义显示出了多媒体以外的插入功能如:ifram网页,或者 code 和Excalidraw,这很实用,也很重要