maisonsmd / carta-plugin-subscript

This plugin adds ability to render subscripts and superscripts to Carta

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

carta-plugin-subscript

carta-plugin-subscript

This plugin adds ability to render subscripts and superscripts to Carta.

Installation

npm i carta-plugin-subscript

Setup

Extension

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

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

<CartaEditor {carta} />

Usage

This snippet:

H~2~O, CO~2~ and CH~4~ are greenhouse gases.
In the 19^th^ century, the concentration of CO~2~ was 280 ppm.

will generate this output:

output

About

This plugin adds ability to render subscripts and superscripts to Carta

License:MIT License


Languages

Language:Svelte 53.3%Language:JavaScript 23.3%Language:TypeScript 19.5%Language:HTML 3.1%Language:Shell 0.8%