maisonsmd / carta-plugin-ins-del

<ins> and <del> tags support for carta-md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

carta-plugin-ins-del

carta-plugin-ins-del

<ins> and <del> tags support for Carta.

Installation

npm i carta-plugin-ins-del

Setup

Styles

No default style are applied, you need to apply your own.
Example custom styles:

.markdown-body ins {
	text-decoration: none;
	background-color: #d4fcbc;
}

.markdown-body del {
	text-decoration: line-through;
	background-color: #fbb;
	color: #555;
}

Extension

<script>
	import { Carta, CartaEditor } from 'carta-md';
	import { insdel } from 'carta-plugin-ins-del';

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

<CartaEditor {carta} />

Usage

This snippet:

There is --nothing-- ++no code++ either good or bad, but --thinking-- ++running it++ makes it so.

will generate this output:

output

About

<ins> and <del> tags support for carta-md

License:MIT License


Languages

Language:JavaScript 40.2%Language:Svelte 31.5%Language:TypeScript 21.5%Language:HTML 5.4%Language:Shell 1.4%