@blocknote/core
Version:
A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.
16 lines (13 loc) • 333 B
text/typescript
export const createLinkWithCaption = (
element: HTMLElement,
caption: string,
) => {
const wrapper = document.createElement("div");
const fileCaption = document.createElement("p");
fileCaption.textContent = caption;
wrapper.appendChild(element);
wrapper.appendChild(fileCaption);
return {
dom: wrapper,
};
};