Skip to content

Releases: ChrisUser/react-basic-contenteditable

v1.2.0

11 Apr 21:45
3f632c3

Choose a tag to compare

Features

  • Added tagName prop to render the editable element as any HTML tag (<p>, <span>, <h1>, etc.)
  • Added multiLine prop to enable single-line mode (prevents Enter key and strips newlines from paste)
  • Added sanitize callback prop to post-process content before onChange fires
  • Added onPaste callback prop for reacting to paste events
  • Added style prop support on the editable element (merged with internal defaults, consumer styles take precedence)
  • Added prop spread for arbitrary HTML attributes (id, data-*, tabIndex, spellCheck, etc.)
  • Added forwardRef with imperative API: focus(), blur(), insertAtCaret(), clear(), getCaretPosition()
  • Added ContentEditableHandle and ContentEditableProps type exports
  • Added aria-multiline attribute for accessibility compliance
  • Added contenteditable="plaintext-only" support for modern browsers
  • Added cursor position metadata to onChange callback (meta.caretPosition)

Fixes

  • Fixed undo/redo not working on macOS (now checks metaKey in addition to ctrlKey)
  • Fixed global event listeners causing cross-instance interference when multiple components are on the same page
  • Fixed disabled prop not actually preventing editing (now sets contentEditable={false})
  • Fixed unbounded undo stack memory leak (capped at 100 entries)
  • Fixed deprecated keyCode usage replaced with key property
  • Fixed dead IE-specific fallback code removed (clipboardData, moveToElementText, setEndPoint)
  • Fixed dead selectionStart check on contenteditable div (always evaluated to false)
  • Fixed react-dom not externalized in library build
  • Fixed SSR safety for contenteditable="plaintext-only" feature detection

v1.0.6

01 Mar 09:27
4d30195

Choose a tag to compare

Features

  • Add undo/redo keyboard handlers

Bugfix

  • Undo (Ctrl+Z) Not Working After Pasting

Full Changelog: v1.0.5...v1.0.6

v1.0.5

14 Feb 23:23
fb7d11f

Choose a tag to compare

Features

  • Add autoFocus prop - proposed by @tuphan-dn in #14

Bugfix

  • Fix placeholder display on empty input by @ChrisUser - reported by @tuphan-dn in #15

Full Changelog: v1.0.4...v1.0.5

v1.0.4

07 Feb 19:18

Choose a tag to compare

Feature

  • Add maxLength and charsCounterClassName props in #13

Full Changelog: v1.0.3...v1.0.4

v1.0.3

28 Dec 14:34
890a767

Choose a tag to compare

Feature

  • Add React 19 compatibility #10

Full Changelog: v1.0.2...v1.0.3

v1.0.2

29 Apr 10:22
690b878

Choose a tag to compare

What's Changed

Feature

  • Removed onChange from required props #3

Full Changelog: v1.0.1...v1.0.2

v1.0.1

01 Apr 20:40

Choose a tag to compare

Bugfix

  • Fixed a build issue

Full Changelog: v1.0.0...v1.0.1

v1.0.0

01 Apr 20:32
7f494fe

Choose a tag to compare

First release

  • Add component, logics, customizations and docs.

Full Changelog: https://github.com/ChrisUser/react-basic-contenteditable/commits/v1.0.0