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

2.1.1 • Public • Published

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, MarkdownEditor } from 'carta-md';
	import { anchor } from '@cartamd/plugin-anchor';

	const carta = new Carta({
		extensions: [anchor()]
	});
</script>

<MarkdownEditor {carta} />

Documentation

Checkout the docs for examples, options and more.

Package Sidebar

Install

npm i @cartamd/plugin-anchor

Weekly Downloads

45

Version

2.1.1

License

MIT

Unpacked Size

4.72 kB

Total Files

6

Last publish

Collaborators

  • astrobear