Skip to content
프로젝트

BearToCode/carta has 778 GitHub stars and 32 forks. GitHot measured 0 stars in 24 hours and -2 in 7 days. Last checked 2026-11-24 02:41 UTC. Last push 2026-10-07.

이 수치를 측정하는 방법

What you can do

  • 🌈 Markdown syntax highlighting (Shiki);
  • 🛠️ Toolbar (extensible);
  • ⌨️ Keyboard shortcuts (extensible);
  • 📦 Supports 150+ plugins thanks to remark;

측정된 스타 증가

in 24h
0
in 7 days
-2
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

소개

A lightweight, fast and extensible Svelte Markdown editor and viewer.

개발 도구

README.md

Original

Banner

Carta

Modern, lightweight, powerful Markdown Editor.


Introduction

Carta is a lightweight, fast and extensible Svelte Markdown editor and viewer. It is powered by unified, remark and rehype. Check out the examples to see it in action. Differently from most editors, Carta does not include a code editor, but it is just a textarea with syntax highlighting, shortcuts and more.

Features

  • 🌈 Markdown syntax highlighting (Shiki);
  • 🛠️ Toolbar (extensible);
  • ⌨️ Keyboard shortcuts (extensible);
  • 📦 Supports 150+ plugins thanks to remark;
  • 🔀 Scroll sync;
  • ✅ Accessibility friendly;
  • 🖥️ SSR compatible;
  • ⚗️ KaTeX support (plugin);
  • 🔨 Slash commands (plugin);
  • 😄 Emojis, with included search (plugin);
  • ✏️ TikZ support (plugin);
  • 📂 Attachment support (plugin);
  • ⚓ Anchor links in headings (plugin);
  • 🌈 Code blocks syntax highlighting (plugin);
  • ⚙️ Embed Components (plugin).

Packages

Package Status Docs
carta-md carta-md /
plugin-math plugin-math /plugins/math
plugin-code plugin-code /plugins/code
plugin-emoji plugin-emoji /plugins/emoji
plugin-slash plugin-slash /plugins/slash
plugin-tikz plugin-tikz /plugins/tikz
plugin-attachment plugin-attachment /plugins/attachment
plugin-anchor plugin-anchor /plugins/anchor
plugin-component plugin-component /plugins/component

Community plugins

Plugin Description
carta-plugin-video Render online videos
carta-plugin-imsize Render images in specific sizes
carta-plugin-subscript Render subscripts and superscripts
carta-plugin-ins-del <ins> and <del> tags support

Getting started

[!WARNING] Sanitization is not dealt with by Carta. You need to provide a sanitizer in the options. Common sanitizers are isomorphic-dompurify (suggested) and sanitize-html. Checkout the documentation for an example.

Installation

Core package:

npm i carta-md

Plugins:

npm i @cartamd/plugin-name

Basic configuration

<script lang="ts">
	import { Carta, MarkdownEditor } from 'carta-md';
	// Component default theme
	import 'carta-md/default.css';

	const carta = new Carta({
		// Remember to use a sanitizer to prevent XSS attacks
		// sanitizer: mySanitizer
	});

	let value = $state('');
</script>

<MarkdownEditor bind:value {carta} />

<style>
	/* Or in global stylesheet */
	/* Set your monospace font */
	/* Required to have the editor working correctly! */
	:global(.carta-font-code) {
		font-family: '...', monospace;
		font-size: 1.1rem;
		line-height: 1.1rem;
		letter-spacing: normal;
	}
</style>

Flags

You can reduce the server-side bundle by using the following vite config. This will remove shiki from the bundle. It may cause issues if you try to use plugin-code on the server, as the highlighter is no longer present there.

// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';

/** @type {import('vite').UserConfig} */
const config = {
	plugins: [sveltekit()],
	define: {
		__ENABLE_CARTA_SSR_HIGHLIGHTER__: false
	}
};
export default config;

Documentation

For the full documentation, examples, guides and more checkout the website.

Contributing & Development

Every contribution is well accepted. If you have a feature request you can open a new issue.

This package uses a pnpm workspace, so pnpm is required to download and put everything together properly.

Committing

This repository is commitizen friendly. To commit use:

npm run commit
# or, if you have commitizen installed globally
git cz

Running docs

If you want to preview the docs:

cd docs
npm run dev

관련 프로젝트 살펴보기

불러오는 중…