@codemirror/view
Advanced tools
Changelog
0.20.6 (2022-05-20)
Make sure the editor re-measures itself when its attributes are updated.
Changelog
0.20.5 (2022-05-18)
Fix an issue where gutter elements without any markers in them would not get the cm-gutterElement
class assigned.
Fix an issue where DOM event handlers registered by plugins were retained indefinitely, even after the editor was reconfigured.
Changelog
0.20.4 (2022-05-03)
Prevent Mac-style behavior of inserting a period when the user inserts two spaces.
Fix an issue where the editor would sometimes not restore the DOM selection when refocused with a selection identical to the one it held when it lost focus.
Changelog
0.20.3 (2022-04-27)
Fix a bug where the input handling could crash on repeated (or held) backspace presses on Chrome Android.
Changelog
0.20.2 (2022-04-22)
The new hideOn
option to hoverTooltip
allows more fine-grained control over when the tooltip should hide.
Changelog
0.20.1 (2022-04-20)
Remove debug statements that accidentally made it into 0.20.0.
Fix a regression in moveVertically
.
Changelog
0.20.0 (2022-04-20)
The deprecated interfaces blockAtHeight
, visualLineAtHeight
, viewportLines
, visualLineAt
, scrollPosIntoView
, scrollTo
, and centerOn
were removed from the library.
All decorations are now provided through EditorView.decorations
, and are part of a single precedence ordering. Decoration sources that need access to the view are provided as functions.
Atomic ranges are now specified through a facet (EditorView.atomicRanges
).
Scroll margins are now specified through a facet (EditorView.scrollMargins
).
Plugin fields no longer exist in the library (and are replaced by facets holding function values).
This package no longer re-exports the Range type from @codemirror/state.
Fix a bug where zero-length block widgets could cause viewportLineBlocks
to contain overlapping ranges.
The new perLineTextDirection
facet configures whether the editor reads text direction per line, or uses a single direction for the entire editor. EditorView.textDirectionAt
returns the direction around a given position.
rectangularSelection
and crosshairCursor
from @codemirror/rectangular-selection were merged into this package.
This package now exports the tooltip functionality that used to live in @codemirror/tooltip.
The exports from the old @codemirror/panel package are now available from this package.
The exports from the old @codemirror/gutter package are now available from this package.
Changelog
0.19.48 (2022-03-30)
Fix an issue where DOM syncing could crash when a DOM node was moved from a parent to a child node (via widgets reusing existing nodes).
To avoid interfering with things like a vim mode too much, the editor will now only activate the tab-to-move-focus escape hatch after an escape press that wasn't handled by an event handler.
Make sure the view measures itself before the page is printed.
Tweak types of view plugin defining functions to avoid TypeScript errors when the plugin value doesn't have any of the interface's properties.
Changelog
0.19.47 (2022-03-08)
Fix an issue where block widgets at the start of the viewport could break height computations.
Changelog
0.19.46 (2022-03-03)
Fix a bug where block widgets on the edges of viewports could cause the positioning of content to misalign with the gutter and height computations.
Improve cursor height next to widgets.
Fix a bug where mapping positions to screen coordinates could return incorred coordinates during composition.