Releases: nezanuha/markdown-text-editor
Releases · nezanuha/markdown-text-editor
Release list
v1.6.0
Added
--mte-fullscreen-z-index: Sets the editor's fullscreen stacking order. Override it on.markdown-editor-wrapperin your own stylesheetdata-editorattribute: 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 now10000(#37)
v1.5.4
Fixed
- Preview prose styles: Typography styles in the preview pane are no longer blocked by
not-proseon any ancestor element in the host page. The typography plugin now uses an internal exclusion class (not-mte-prose) so third-partynot-proseusage 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
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
image silently stripped it to plain text instead of opening the modal pre-filled for editing - ImageTool: Selecting only the alt text inside
caused nested syntax like](newurl). The selection now auto-expands to cover the full image before opening the modal - Footer: Configuring
footerwith onlywords: true(and all other options false) showed no footer. Thewordsoption 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
Changed
- Updated npm package keywords for improved discoverability
- Updated README
v1.5.1
Fixed
onChangetoolbar support: Toolbar buttons, heading tool, list continuation, undo/redo, and checkbox toggles now correctly trigger theonChangecallback. Previously only manual typing fired it- PreviewTool memory leak: Escape key listener and
overflow-hiddenbody class are now cleaned up when the editor is destroyed while fullscreen is active - PreviewTool accessibility: Toolbar buttons are now properly
disabled(not justaria-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 whendestroy()is called, preventing stale listeners from firing after the editor is torn down
v1.5.0
Added
- More keyboard shortcuts:
Ctrl+1/Ctrl+2/Ctrl+3for H1–H3 headings,Ctrl+Lfor unordered list,Ctrl+Shift+ForF11to 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
Aabutton 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
onclickhandlers, which were blocked by strict Content Security Policy headers. Event listeners are now attached via JavaScript
v1.4.0
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+Fto open a find panel orCtrl+Hto 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 withEscape onChangeoption: Pass anonChange(value)callback to be notified whenever the editor content changesfooter.wordsoption: New opt-in word count stat in the status bar. Setfooter: { words: true }to enable it alongside the existing line, column, and character statsminHeightoption: Minimum height in pixels the editor will shrink to when content is short. Defaults to200. Pairs with the existingmaxHeightoption to define the full auto-grow rangedestroy()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
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
Changed
- Renamed internal CSS class
textareatoeditor-textareato avoid conflicts with third-party stylesheets targeting generic class names - Added
font: inheritreset to.editor-textareaso the editor inherits the page font instead of defaulting to the browser's monospace fallback
v1.1.4
Changed
- devDependencies: Updated
frutjamto 2.0.4