Carta

screenshot of Carta

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

Overview

Carta is a lightweight, fast, and extensible Svelte Markdown editor and viewer. Recently updated to v4, it features major changes and is powered by unified, remark, and rehype, offering a unique approach without a code editor but with syntax highlighting, shortcuts, and more.

Features

  • Markdown syntax highlighting using Shiki
  • Extensible toolbar for enhanced customization
  • Keyboard shortcuts that can be extended
  • Support for 150+ plugins thanks to remark
  • Scroll synchronization for improved user experience
  • Accessibility friendly design
  • SSR compatible for seamless rendering
  • KaTeX support through a dedicated plugin
  • Slash commands functionality available as a plugin
  • Emoji support with integrated search feature
  • TikZ support with a specific plugin
  • Attachment support for documents
  • Anchor links within headings for easier navigation
  • Code blocks syntax highlighting facilitated by a plugin

Core Package:

npm install carta-md

Plugins:

npm install plugin-math plugin-code plugin-emoji plugin-slash plugin-tikz plugin-attachment plugin-anchor

Basic Configuration:

Ensure to provide a sanitizer in the options. Popular sanitizers include isomorphic-dompurify and sanitize-html. Refer to the documentation for a detailed example.

Summary

Carta v4 is a feature-rich Markdown editor and viewer that stands out for its lightweight and extensible nature. With support for numerous plugins and a user-friendly interface, Carta offers a unique markdown editing experience with syntax highlighting, keyboard shortcuts, and more. Installation is straightforward with npm packages, and users are encouraged to explore the wide range of features and customization options provided by Carta.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.