markdown-text-editor 1.9.4 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ### Toolbar, live preview and WYSIWYG on the textarea you already have
4
4
 
5
+ > **Version 2.0 is in beta** — `npm install markdown-text-editor@beta`
6
+ >
7
+ > The interface is translated into 56 languages, and the stylesheet is now a
8
+ > separate file you link yourself — that last part is the breaking change.
9
+ > 1.x stays on `latest` until 2.0 ships.
10
+ > [What is in 2.0](https://github.com/nezanuha/markdown-text-editor/blob/2.0.0/CHANGELOG.md)
11
+
5
12
  [![npm installs][npm_installs]](https://www.npmjs.com/package/markdown-text-editor)
6
13
  [![Jsdelivr hits][jsdelivr]](https://cdn.jsdelivr.net/npm/markdown-text-editor)
7
14
  [![Latest Release](https://img.shields.io/npm/v/markdown-text-editor.svg)](https://github.com/nezanuha/markdown-text-editor/releases)
@@ -9,17 +16,21 @@
9
16
  [![Secured](https://img.shields.io/badge/Security-Passed-green)](https://snyk.io/test/github/nezanuha/markdown-text-editor)
10
17
  ![GitHub Repo stars](https://img.shields.io/github/stars/nezanuha/markdown-text-editor?style=flat)
11
18
 
12
- A lightweight, embeddable JavaScript Markdown editor that transforms a standard HTML `<textarea>` into a full-featured editing experience — without breaking native form submission. Works with any backend (Django, Laravel, PHP, Node.js, Rails) out of the box.
19
+ A lightweight, embeddable JavaScript Markdown editor that enhances a standard HTML `<textarea>` instead of replacing it, so native form submission, validation and `required` fields keep working. No data binding, no API to learn. Toolbar, live preview and WYSIWYG hybrid mode. Works with any backend: Django, Laravel, PHP, Node.js, Rails.
13
20
 
14
- A native-first Markdown editor built on a standard textarea. No data binding, no API — just drop it in and your forms keep working as-is.
21
+ ```bash
22
+ npm install markdown-text-editor
23
+ ```
15
24
 
16
- **Works standalone.** No Frutjam, no Tailwind, no framework required, the styles are bundled.
25
+ **[Try the live demo and read the docs](https://frutjam.com/plugins/markdown-editor)** · [Quick Start](#-quick-start) · [Why not EasyMDE?](#-why-developers-choose-this-over-easymde--simplemde)
17
26
 
18
27
  ![Hybrid mode: headings, bold text and list markers styled live inside the textarea while the Markdown syntax stays visible](https://cdn.frutjam.com/media/plugins/hybrid-mode-markdown-editor.webp)
19
28
 
20
29
  <sub>Hybrid mode. Text is styled as you type and the Markdown stays where it is, because this is your `<textarea>`, not a copy of it.</sub>
21
30
 
22
- > **No complex APIs. No data binding. No JSON schemas.** Just a `<textarea>` that types Markdown and submits like any normal form field — enhanced with a rich toolbar, live preview, and WYSIWYG hybrid mode.
31
+ **Works standalone.** No Frutjam, no Tailwind, no framework required, the styles are bundled.
32
+
33
+ **Looks like the rest of your app.** It takes the typeface and size from the page it sits on, and picks up `data-theme` from any ancestor, so it doesn't turn up looking like someone else's component.
23
34
 
24
35
  ## ⭐ Why developers choose this over EasyMDE / SimpleMDE
25
36
 
@@ -40,7 +51,7 @@ Most JavaScript markdown editors (EasyMDE, SimpleMDE, CodeMirror-based editors)
40
51
  | Swap the markdown parser | ✅ | ❌ |
41
52
  | Keyboard shortcuts | ✅ | Partial |
42
53
  | Dark mode / theming | ✅ | Limited |
43
- | Bundle size, gzipped | 54 KB | 107 KB (JS + CSS) |
54
+ | Bundle size, gzipped | 57 KB | 107 KB (JS + CSS) |
44
55
 
45
56
  ## 🚀 Quick Start
46
57
 
@@ -98,12 +109,13 @@ That's it. Form submission, `.value` access, and all native textarea behaviour w
98
109
  - 🛡️ **XSS Safe** — Preview output sanitized via [DOMPurify](https://github.com/cure53/DOMPurify) before rendering, including the output of a custom renderer
99
110
  - 🛡️ **No inline scripts** — No inline event handlers and no `eval`, so `script-src` needs no exception. The stylesheet is currently injected as a `<style>` element, which a strict `style-src` blocks ([#42](https://github.com/nezanuha/markdown-text-editor/issues/42))
100
111
  - 🌍 **RTL Support** — Native Right-to-Left support for Arabic, Urdu, Farsi, and other RTL languages
101
- - 🌙 **Dark Mode & Theming** — Inherits `data-theme` from any ancestor element. Built-in light, dark, snowberry, and darkberry themes. Fully customizable via CSS variables
112
+ - 🎨 **Inherits Your UI** — Uses the typeface and size of the page it's dropped into, so it matches your forms rather than imposing its own look. Nothing to configure
113
+ - 🌙 **Dark Mode & Theming** — Picks up `data-theme` from any ancestor element, and follows the system setting when there isn't one. Built-in light, dark, snowberry, and darkberry themes. Fully customizable via CSS variables
102
114
  - 🧩 **Custom Tools** — Add your own toolbar button with `{ custom: { title, icon, action } }`, or extend `MarkdownEditor.Tool` when it builds its own markup. Keyboard shortcuts, translation and teardown work exactly as they do for the built-ins. No fork, no patching
103
115
  - 🎛️ **Modular Toolbar** — Pick exactly which tools appear and in what order
104
116
  - 🟦 **TypeScript Ready** — Definitions ship with the package. Options, toolbar entries and variable shapes are all checked, so a mistyped tool name is a compile error rather than a silently missing button
105
117
  - 📦 **Universal Module Support** — ESM, CommonJS, UMD, and IIFE. Works with Vite, webpack, Rollup, or directly via `<script src>` CDN — no configuration needed
106
- - 🚀 **High Performance** — ~54KB gzipped (253KB minified). Debounced preview, cached layout calculations, conflict-free Tab/Enter handling for large documents
118
+ - 🚀 **High Performance** — ~57KB gzipped (261KB minified). Debounced preview, cached layout calculations, conflict-free Tab/Enter handling for large documents
107
119
 
108
120
  ## 🛠 Developer Workflow
109
121