Plugins

Emoji

This plugin adds support for Emojis.

Installation

npm i @cartamd/plugin-emoji

Setup

Styles

Import the default theme, or create you own:

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

Extension

<script>
	import { Carta, MarkdownEditor } from 'carta-md';
	import { emoji } from '@cartamd/plugin-emoji';

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

<MarkdownEditor {carta} />

Options

Here are the options you can pass to emoji():

export interface EmojiExtensionOptions {
	/**
	 * Custom in transition. See https://svelte.dev/docs#run-time-svelte-transition.
	 */
	inTransition?: (node: Element) => TransitionConfig;
	/**
	 * Custom out transition. See https://svelte.dev/docs#run-time-svelte-transition.
	 */
	outTransition?: (node: Element) => TransitionConfig;
}
Handmade by Davide