carta-plugin-ins-del
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

carta-plugin-ins-del

carta-plugin-ins-del

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

Breaking changes in v2

  • Update to support Carta v4
  • Now this plugin is just a wrapper for remark-ins
  • For del tag, use double tilde ~~ instead of double hyphen -- to align with the rest of the markdown parsers

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

Package Sidebar

Install

npm i carta-plugin-ins-del

Weekly Downloads

3

Version

2.0.1

License

MIT

Unpacked Size

5.82 kB

Total Files

5

Last publish

Collaborators

  • maisonsmd