markular

August 24, 2025 ยท View on GitHub

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.

Demo

๐Ÿ“ฆ 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

NameDescriptionTypeDefault
optionsMarkular optionsOptionsDefault
placeholderEditor placeholderstring'Enter markdown...'
rowsEditor number of rowsnumber10

Keyboard Shortcuts

On MacOS you can use CMD button instead of Ctrl.

ShortcutAction
Ctrl + bBold
Ctrl + iItalic
Ctrl + zUndo
Ctrl + Shift + zRedo
Ctrl + EnterToggle 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.