Editor state data structures for the CodeMirror code editor
Last release 1 months ago
05 Jul 2026
Ships unpredictably
gaps range from 8 days to 11 months
Nearly every release is documented
notes for 46 of 46 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
46 releases · first in 2020
Release timeline
46 releases since 2020One column per quarter.
Releases
- 6.7.15 Jul 2026
Release notes2 sources agree
Open source →Bug fixes
Make sure facet providers, precedence extensions, and compartment instances have the
extensionfield theExtensiontype claims they have. - 6.7.023 Jun 2026
Release notes2 sources agree
Open source →New features
Selection ranges can now be 'undirectional', making selection-expanding commands pick the side that would grow the selection, instead of the given head.
- 6.6.012 Mar 2026
Release notes2 sources agree
Open source →New features
EditorSelection.rangenow takes an optionalassocargument.SelectionRange.extendcan now be given a third argument to specify associativity. - 6.5.414 Jan 2026
Release notes2 sources agree
Open source →Bug fixes
Make
SelectionRange.eqreturn false when the ranges have different goal columns. - 6.5.322 Dec 2025
Release notes2 sources agree
Open source →Bug fixes
Fix an issue where
RangeValue.eqcould get called with a value of a different class.EditorState.charCategorizernow only uses the highest-precedence set of word characters from the language data, to allow overriding these. - 6.5.23 Feb 2025
Release notes2 sources agree
Open source →Bug fixes
Fix a bug where reconfiguring a field with a new
initvalue didn't update the value of the field. - 6.5.110 Jan 2025
Release notes2 sources agree
Open source →Bug fixes
countColumnno longer loops infinitely when given atothat's higher than the input string's length. - 6.5.09 Dec 2024
Release notes2 sources agree
Open source →New features
RangeSet.comparenow supports aboundChangecallback that is called when there's a change in the way ranges are split. - 6.4.119 Feb 2024
Release notes2 sources agree
Open source →Bug fixes
Fix an issue that caused widgets at the end of a mark decoration to be rendered in their own separate mark DOM element.
- 6.4.028 Dec 2023
Release notes2 sources agree
Open source →Bug fixes
When multiple ranges in a single range set overlap, put the smaller ones inside the bigger ones, so that overlapping decorations don't break up each other's elements when coming from the same source.
New features
Selection and selection range
eqmethods now support an optional argument that makes them also compare by cursor associativity.The
RangeSet.joinfunction can be used to join multiple range sets together. - 6.3.36 Dec 2023
Release notes2 sources agree
Open source →Bug fixes
Fix an issue where
Text.sliceandText.replacecould return objects with incorrectlengthwhen the givenfrom/tovalues were out of range for the text. - 6.3.227 Nov 2023
Release notes2 sources agree
Open source →Bug fixes
Make sure transactions cannot add multiple selections when
allowMultipleSelectionsis false.Fix a bug that caused
Text.iterLinesto not return empty lines at the end of the iterated ranges. - 6.3.118 Oct 2023
Release notes2 sources agree
Open source →Bug fixes
Give the tag property on
FacetReaderthe type of the output type parameter to force TypeScript to infer the proper type when converting fromFacettoFacetReader. - 6.3.012 Oct 2023
Release notes2 sources agree
Open source →New features
The new
FacetReadertype provides a way to export a read-only handle to aFacet. - 6.2.123 May 2023
Release notes2 sources agree
Open source →Bug fixes
Fix an issue that could cause
RangeSet.compareto miss changes in the set of active ranges around a point range. - 6.2.026 Dec 2022
Release notes2 sources agree
Open source →New features
EditorSelection.rangenow accepts an optional 4th argument to specify the bidi level of the range's head position. - 6.1.415 Nov 2022
Release notes2 sources agree
Open source →Bug fixes
Fix a bug that caused the
openStartvalue passed to span iterators to be incorrect around widgets in some circumstances. - 6.1.310 Nov 2022
Release notes2 sources agree
Open source →Bug fixes
Avoid unnecessary calls to computed facet getters when a state is reconfigured but no dependencies of the computed facet change.
Fix an infinite loop in
RangeSet.eqwhen thetoparameter isn't given. - 6.1.221 Sept 2022
Release notes2 sources agree
Open source →Bug fixes
Fix an issue where, when multiple transaction extenders took effect, only the highest-precedence one was actually included in the transaction.
- 6.1.13 Aug 2022
Release notes2 sources agree
Open source →Bug fixes
Fix a bug in range set span iteration that would cause decorations to be inappropriately split in some situations.
- 6.1.030 Jun 2022
Release notes2 sources agree
Open source →Bug fixes
Refine change mapping to preserve insertions made by concurrent changes.
New features
The
enablesoption toFacet.definemay now take a function, which will be called with the facet value to create the extensions. - 6.0.117 Jun 2022
Release notes2 sources agree
Open source →Bug fixes
Fix a problem that caused effects'
mapmethods to be called with an incorrect change set when filtering changes. - 6.0.08 Jun 2022
- 0.20.12 Jun 2022
Release notes2 sources agree
Open source →New features
EditorView.phrasenow accepts additional arguments, which it will interpolate into the phrase in the place of$markers. - 0.20.020 Apr 2022
Release notes2 sources agree
Open source →Breaking changes
The deprecated precedence names
fallback,extend, andoverridewere removed from the library.Bug fixes
Fix a bug where, if an extension value occurs multiple times, its lowest, rather than highest precedence is used.
Fix an issue where facets with computed inputs would unneccesarily have their outputs recreated on state reconfiguration.
Fix a bug in the order in which new values for state fields and facets were computed, which could cause dynamic facets to hold the wrong value in some situations.
New features
The exports from @codemirror/rangeset now live in this package.
The exports from @codemirror/text now live in this package.
- 0.19.916 Feb 2022
Release notes2 sources agree
Open source →Bug fixes
Mapping a non-empty selection range now always puts any newly inserted text on the sides of the range outside of the mapped version.
- 0.19.815 Feb 2022
Release notes2 sources agree
Open source →Bug fixes
Fix a bug where facet values with computed inputs could incorrectly retain their old value on reconfiguration.
- 0.19.711 Feb 2022
Release notes2 sources agree
Open source →Bug fixes
Avoid recomputing facets on state reconfiguration if that facet's inputs stayed precisely the same.
Selection ranges created with
EditorSelection.rangewill now have an assoc pointing at their anchor, when non-empty. - 0.19.619 Nov 2021
Release notes2 sources agree
Open source →Bug fixes
Fix a bug that caused facet compare functions to be called with an invalid value in some situations.
Fix a bug that caused dynamic facet values to be incorrectly kept unchanged when reconfiguration changed one of their dependencies.
- 0.19.510 Nov 2021
Release notes2 sources agree
Open source →Bug fixes
Fix a bug that would cause dynamic facet values influenced by a state reconfiguration to not properly recompute.
- 0.19.45 Nov 2021
Release notes2 sources agree
Open source →Bug fixes
When reconfiguring a state, effects from the reconfiguring transaction can now be seen by newly added state fields.
- 0.19.33 Nov 2021
Release notes2 sources agree
Open source →New features
The precedence levels (under
Prec) now have more generic names, because their 'meaningful' names were entirely inappropriate in many situations. - 0.19.213 Sept 2021
Release notes2 sources agree
Open source →New features
The editor state now has a
readOnlyproperty with a matching facet to control its value. - 0.19.115 Aug 2021
Release notes2 sources agree
Open source →Bug fixes
Fix a bug where
wordAtnever returned a useful result. - 0.19.011 Aug 2021
Release notes2 sources agree
Open source →Breaking changes
User event strings now work differently—the events emitted by the core packages follow a different system, and hierarchical event tags can be created by separating the words with dots.
New features
languageDataAtnow takes an optionalsideargument to specificy which side of the position you're interested in.It is now possible to add a user event annotation with a direct
userEventproperty on a transaction spec.Transactions now have an
isUserEventmethod that can be used to check if it is (a subtype of) some user event type. - 0.18.74 May 2021
Release notes2 sources agree
Open source →Bug fixes
Fix an issue where state fields might be initialized with a state that they aren't actually part of during reconfiguration.
- 0.18.612 Apr 2021
Release notes2 sources agree
Open source →New features
The new
EditorState.wordAtmethod finds the word at a given position. - 0.18.58 Apr 2021
Release notes2 sources agree
Open source →Bug fixes
Fix an issue in the compiled output that would break the code when minified with terser.
- 0.18.46 Apr 2021
Release notes2 sources agree
Open source →New features
The new
Transaction.remoteannotation can be used to mark and recognize transactions created by other actors. - 0.18.323 Mar 2021
Release notes2 sources agree
Open source →New features
The
ChangeDescclass now hastoJSONandfromJSONmethods. - 0.18.214 Mar 2021
Release notes2 sources agree
Open source →Bug fixes
Fix unintended ES2020 output (the package contains ES6 code again).
- 0.18.110 Mar 2021
Release notes2 sources agree
Open source →New features
The new
Compartment.getmethod can be used to get the content of a compartment in a given state. - 0.18.03 Mar 2021
Release notes2 sources agree
Open source →Breaking changes
tagExtensionand thereconfiguretransaction spec property have been replaced with the concept of configuration compartments and reconfiguration effects (seeCompartment,StateEffect.reconfigure, andStateEffect.appendConfig). - 0.17.219 Feb 2021
Release notes2 sources agree
Open source →New features
EditorSelection.mapandSelectionRange.mapnow take an optional second argument to indicate which direction to map to. - 0.17.16 Jan 2021
Release notes2 sources agree
Open source →New features
The package now also exports a CommonJS module.
- 0.17.029 Dec 2020