Skip to content

Peiiii/zenmark-editor

Repository files navigation

Zenmark

✍️ Zenmark is an open-source WYSIWYG Markdown editor based on Tiptap, offering a smooth writing experience with rich features.

License

English | 简体中文

🌐 Demo

Live Demo

Screenshot

✨ Features

  • 🎯 WYSIWYG: Real-time Markdown preview
  • 📝 Smart Editing: Keyboard shortcuts
  • 🎨 Code Highlighting: Syntax highlighting powered by highlight.js
  • 📊 Table Editing: Intuitive table editing experience
  • Task Lists: Interactive task lists
  • 🔢 Math Formulas: LaTeX math formula support with KaTeX
  • 🌍 i18n: Multi-language interface
  • 🤝 Collaboration: Real-time collaboration support with Yjs
  • 🎨 Theming: Light and dark theme support
  • 🔌 Extensible: Based on Tiptap's powerful extension system

🚀 Getting Started

Use as a Component

npm install zenmark-editor
import { ZenmarkEditor } from 'zenmark-editor';

function App() {
  return (
    <ZenmarkEditor
      readContent={() => Promise.resolve('# Hello Zenmark!')}
      writeContent={(content) => Promise.resolve()}
      subscribeContent={(cb) => () => {}}
    />
  );
}

📖 Documentation

Props

  • readContent: () => Promise - Function to read the initial content
  • writeContent: (content: string) => Promise - Function to handle content updates
  • subscribeContent: (callback: (content: string) => void) => () => void - Function to subscribe to content changes

📄 License

MIT License

About

Zenmark: An open-source, Typora-like WYSIWYG Markdown editor.

Resources

Stars

Watchers

Forks

Packages

No packages published