tiptap-extension-majestic-image

1.0.3 • Public • Published

Image extension for tiptap & majestic-ui

npm package

import tiptapImageExtension from 'tiptap-extension-majestic-image'

const editor = ref()

onMounted(() => {
	editor.value = new Editor({
		extensions: [
            tiptapImageExtension,
		]
	})	
})

const addImage = ({ path, id }: { path: string; id: number }) => {
	editor.value
		?.chain()
		.focus()
		.setImage({ src: path, id: `image-${id}` })
		.run()
}

Package Sidebar

Install

npm i tiptap-extension-majestic-image

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

4.02 kB

Total Files

4

Last publish

Collaborators

  • loremru