carta/packages/plugin-slash
2023-11-19 19:37:48 +01:00
..
src style: update prettier 2023-11-15 21:44:08 +01:00
static convert plugins vite packages to sveltekit 2023-05-26 20:03:53 +02:00
.gitignore convert plugins vite packages to sveltekit 2023-05-26 20:03:53 +02:00
package.json feat: better caret-bounded components positioning 2023-11-14 18:44:18 +01:00
README.md docs: update all READMEs 2023-11-19 19:37:48 +01:00
svelte.config.js convert plugins vite packages to sveltekit 2023-05-26 20:03:53 +02:00
tsconfig.json convert plugins vite packages to sveltekit 2023-05-26 20:03:53 +02:00
vite.config.ts convert plugins vite packages to sveltekit 2023-05-26 20:03:53 +02:00

Carta Slash Plugin

This plugin adds support for Slash commands. Install it using:

npm i @cartamd/plugin-slash

Setup

Styles

Import the default theme, or create you own:

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

Extension

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

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

<CartaEditor {carta} />

Documentation

Checkout the docs for examples, options and more.