Skip to content

larswaechter/markular

Repository files navigation

markular

License: MIT TypeScript npm version Test and Deploy

A lightweight Markdown Editor for Angular.

Preview

📍 Introduction

markular is a fast to setup and easy to use open source Markdown editor for Angular >= 20.

Key features are:

  • Markdown editing
  • Formatting toolbar
  • Keyboard shortcuts
  • Editing history
  • Markdown file download
  • Markdown to HTML rendering / preview

Internally, it uses marked for parsing Markdown and dompurify for sanitizing the output HTML.

📦 Installation

Install via npm:

npm i --save markular

🔨 Usage

Setup

Import the according component:

import { Markular } from 'markular';
import { FormsModule } from '@angular/forms';

@Component({
  imports: [Markular, FormsModule]
  // ...
})
export class MyApp {
  markdown = '# Hello World!'
}

and use it in your template:

<markular [(ngModel)]="markdown"></markular>

See the demo app for a more detailed example.

API

Name Description Type Default
options Markular options Options Default
placeholder Editor placeholder string 'Enter markdown...'
rows Editor number of rows number 10

Keyboard Shortcuts

On MacOS you can use CMD button instead of Ctrl.

Shortcut Action
Ctrl + b Bold
Ctrl + i Italic
Ctrl + z Undo
Ctrl + Shift + z Redo
Ctrl + Enter Toggle editor / preview

👋 Shoutouts

A big shoutout and thank you to:

🧩 Contributing

Any contribution is appreciated! See CONTRIBUTING.md

Buy Me a Coffee at ko-fi.com

🔑 License

markular is released under MIT license.

About

A lightweight Markdown Editor for Angular.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published