Skip to content

Releases: nezanuha/markdown-text-editor

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 02 Sep 12:23

Added

  • --mte-fullscreen-z-index: Sets the editor's fullscreen stacking order. Override it on .markdown-editor-wrapper in your own stylesheet
  • data-editor attribute: The editor now mirrors its textarea's id, so a single editor can be targeted in CSS with [data-editor="my-textarea-id"] when several are on one page

Changed

  • Fullscreen corners: The editor now sits flush to the viewport edges in fullscreen instead of keeping a small border radius

Fixed

  • Fullscreen z-index: Fullscreen mode used a hardcoded z-index: 999, below the range UI frameworks reserve for fixed headers and overlays, so page toolbars painted over the editor. The default is now 10000 (#37)

v1.5.4

Choose a tag to compare

@github-actions github-actions released this 21 Jul 12:00

Fixed

  • Preview prose styles: Typography styles in the preview pane are no longer blocked by not-prose on any ancestor element in the host page. The typography plugin now uses an internal exclusion class (not-mte-prose) so third-party not-prose usage has no effect on the editor
  • Split view scrollbar: In fullscreen split view, the textarea scrollbar appeared inside the preview panel instead of the editing area

v1.5.3

Choose a tag to compare

@github-actions github-actions released this 21 Jul 06:59

Fixed

  • PreviewTool: Fixed a bug introduced in a recent version where toolbar buttons stopped working on desktop when fullscreen preview was active. On mobile they remain disabled since the editor is hidden
  • HeadingTool: Heading button is now the same size as other toolbar buttons
  • LinkTool: Edited link text was ignored — the modal submitted the original selected text instead of what was typed in the Link text field
  • LinkTool: Clicking the link button with only the label selected inside an existing [text](url) link caused nested syntax like [[text](url)](newurl). The selection now auto-expands to cover the full link before opening the modal
  • ImageTool: Edited alt text was ignored — the modal submitted the original selected text instead of what was typed in the Alt text field
  • ImageTool: Selecting a full ![alt](url) image silently stripped it to plain text instead of opening the modal pre-filled for editing
  • ImageTool: Selecting only the alt text inside ![alt](url) caused nested syntax like ![![alt](url)](newurl). The selection now auto-expands to cover the full image before opening the modal
  • Footer: Configuring footer with only words: true (and all other options false) showed no footer. The words option is now included in the visibility check
  • Split view scrollbar: In fullscreen preview mode, the textarea scrollbar appeared in the middle of the screen and overlapped the preview panel content
  • scrollToView: After clicking a toolbar button, the editor scrolled to the wrong line when content had actual newlines

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 13 Jul 08:57

Changed

  • Updated npm package keywords for improved discoverability
  • Updated README

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 06 Jul 07:01

Fixed

  • onChange toolbar support: Toolbar buttons, heading tool, list continuation, undo/redo, and checkbox toggles now correctly trigger the onChange callback. Previously only manual typing fired it
  • PreviewTool memory leak: Escape key listener and overflow-hidden body class are now cleaned up when the editor is destroyed while fullscreen is active
  • PreviewTool accessibility: Toolbar buttons are now properly disabled (not just aria-disabled) when fullscreen preview is active, preventing keyboard activation
  • ImageTool upload error handling: HTTP error responses (4xx/5xx) from the upload endpoint are now caught correctly instead of being silently mishandled
  • destroy() memory leaks: All event listeners (input, scroll, footer, undo/redo, list continuation) are now properly removed when destroy() is called, preventing stale listeners from firing after the editor is torn down

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 28 Jun 08:33

Added

  • More keyboard shortcuts: Ctrl+1 / Ctrl+2 / Ctrl+3 for H1–H3 headings, Ctrl+L for unordered list, Ctrl+Shift+F or F11 to toggle fullscreen. Shortcut hints added to heading and preview toolbar button tooltips
  • Find & Replace match highlight: The current match is now highlighted in the editor with a colored overlay as you type — works in both plain and hybrid modes. The highlight stays visible while the find input keeps focus, and updates as the textarea scrolls
  • Find & Replace case-sensitive toggle: An Aa button in the find panel toggles case-sensitive search. Affects both navigation and replace all

Fixed

  • CSP compatibility: Modal close buttons in the Link and Image tools no longer use inline onclick handlers, which were blocked by strict Content Security Policy headers. Event listeners are now attached via JavaScript

v1.4.0

Choose a tag to compare

@rashadmehtab rashadmehtab released this 16 Jun 17:12

Added

  • Keyboard shortcuts: Common formatting actions can now be triggered from the keyboard — Ctrl+B (Bold), Ctrl+I (Italic), Ctrl+K (Link), Ctrl+\ (inline Code), Ctrl+Shift+S (Strikethrough). Each shortcut is displayed in the corresponding toolbar button's tooltip
  • Find & Replace: Press Ctrl+F to open a find panel or Ctrl+H to open find & replace. Case-insensitive search with a live match counter, next/prev navigation, single replace, and replace all. The panel floats in the top-right corner of the editor and closes with Escape
  • onChange option: Pass an onChange(value) callback to be notified whenever the editor content changes
  • footer.words option: New opt-in word count stat in the status bar. Set footer: { words: true } to enable it alongside the existing line, column, and character stats
  • minHeight option: Minimum height in pixels the editor will shrink to when content is short. Defaults to 200. Pairs with the existing maxHeight option to define the full auto-grow range
  • destroy() method: Removes the editor DOM wrapper, restores the original <textarea> to its position in the document, and cleans up internal event listeners. Useful in single-page applications when unmounting a view

v1.2.0

Choose a tag to compare

@rashadmehtab rashadmehtab released this 14 May 08:47

Added

  • Auto-grow editor: The editor now expands vertically as content grows in non-fullscreen mode. A scrollbar appears only once content exceeds the maximum height, which defaults to 500px and can be overridden via the maxHeight option
  • Resize handle: The editor has a drag handle at the bottom corner so users can manually resize it taller or shorter
  • Escape key exits fullscreen: Pressing Escape while in fullscreen preview mode now exits back to the normal editor view
  • XSS sanitization: Preview output is now sanitized via DOMPurify before being rendered — prevents script injection through crafted markdown input

Fixed

  • Fullscreen layout with long content: Scrolling in fullscreen preview mode no longer breaks with very long text — the editor and preview panels are correctly bounded to the viewport height (#29)
  • Crawlable links: Replaced anchor elements without href in the heading dropdown with button elements — fixes the Links are not crawlable PageSpeed audit
  • Accessibility: Added proper menu role attributes and labels to the heading popover for correct screen reader semantics

Changed

  • devDependencies: Updated frutjam to 2.1.1
  • devDependencies: Updated vite to 8.0.12
  • dependencies: Added dompurify 3.4.3

v1.1.5

Choose a tag to compare

@rashadmehtab rashadmehtab released this 11 May 05:18

Changed

  • Renamed internal CSS class textarea to editor-textarea to avoid conflicts with third-party stylesheets targeting generic class names
  • Added font: inherit reset to .editor-textarea so the editor inherits the page font instead of defaulting to the browser's monospace fallback

v1.1.4

Choose a tag to compare

@rashadmehtab rashadmehtab released this 10 May 12:51

Changed

  • devDependencies: Updated frutjam to 2.0.4