@cartamd/plugin-attachment
TypeScript icon, indicating that this package has built-in type declarations

4.0.2 • Public • Published

Carta Attachment Plugin

This plugin adds support for attachments. Install it using:

npm i @cartamd/plugin-attachment

Setup

Styles

Import the default theme, or create you own:

import '@cartamd/plugin-attachment/default.css';

Extension

<script lang="ts">
	import { Carta, MarkdownEditor } from 'carta-md';
	import { attachment } from '@cartamd/plugin-attachment';

	const carta = new Carta({
		extensions: [
			attachment({
				upload(file) {
					/* ... */
				}
			})
		]
	});
</script>

<MarkdownEditor {carta} />

Documentation

Checkout the docs for examples, options and more.

/@cartamd/plugin-attachment/

    Package Sidebar

    Install

    npm i @cartamd/plugin-attachment

    Weekly Downloads

    325

    Version

    4.0.2

    License

    MIT

    Unpacked Size

    15.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • astrobear