carta-plugin-ins-del
Version:
<ins> and <del> tags support for carta-md
65 lines (44 loc) • 1.21 kB
Markdown

`<ins>` and `<del>` tags support for [Carta](https://github.com/BearToCode/carta).
- Update to support Carta v4
- Now this plugin is just a wrapper for [remark-ins](https://github.com/ipikuka/remark-ins)
- For del tag, use double tilde `~~` instead of double hyphen `--` to align with the rest of the markdown parsers
```shell
npm i carta-plugin-ins-del
```
No default style are applied, you need to apply your own.
Example custom styles:
```css
.markdown-body ins {
text-decoration: none;
background-color:
}
.markdown-body del {
text-decoration: line-through;
background-color:
color:
}
```
```svelte
<script>
import { Carta, CartaEditor } from 'carta-md';
import { insdel } from 'carta-plugin-ins-del';
const carta = new Carta({
extensions: [insdel()],
});
</script>
<CartaEditor {carta} />
```
This snippet:
```
There is ~~nothing~~ ++no code++ either good or bad, but ~~thinking~~ ++running it++ makes it so.
```
will generate this output:
