- Create a file
Image.jsfrom the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that acceptsuploadFunc(function to be called withimagebeing uploaded) and additional logicif(upload) { ... } else { ... previous base64 logic .. }in thenew Pluginsection.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*