| .. | ||
| src | ||
| static | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
| svelte.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||
Carta Anchor Plugin
This plugin adds id attributes and permalinks to headings. Install it using:
npm i @cartamd/plugin-anchor
Setup
Styles
Import the default theme, or create you own:
import '@cartamd/plugin-anchor/default.css';
Extension
<script>
	import { Carta, CartaEditor } from 'carta-md';
	import { anchor } from '@cartamd/plugin-anchor';
	const carta = new Carta({
		extensions: [anchor()]
	});
</script>
<CartaEditor {carta} />
Documentation
Checkout the docs for examples, options and more.