prosemirror-view
Advanced tools
Changelog
0.17.2 (2017-01-16)
Call custom click handlers before applying select-node behavior for a ctrl/cmd-click.
Fix failure to apply DOM changes that start at document position 0.
Changelog
0.17.1 (2017-01-07)
Fix issue where a document update that left the selection in the same place sometimes led to an incorrect DOM selection.
Make sure EditorView.focus
doesn't cause the browser to scroll the top of the editor into view.
Changelog
0.17.0 (2017-01-05)
The handleDOMEvent
prop has been dropped in favor of the handleDOMEvents
(plural) prop.
The onChange
prop has been replaced by a dispatchTransaction
prop (which takes a transaction instead of an action).
Added support for a handleDOMEvents
prop, which allows you to provide handler functions per DOM event, and works even for events that the editor doesn't normally add a handler for.
Add view method dispatch
, which provides a convenient way to dispatch transactions.
The dispatchTransaction
(used to be onAction
) prop is now optional, and will default to simply applying the transaction to the current view state.
Widget decorations now accept an option associative
which can be used to configure on which side of content inserted at their position they end up.
Typing immediately after deleting text now preserves the marks of the deleted text.
Transactions that update the selection because of mouse or touch input now get a metadata property pointer
with the value true
.
Changelog
0.16.0 (2016-12-23)
Solve problem where setting a node selection would trigger a DOM read, leading to the selection being reset.
Changelog
0.15.2 (2016-12-10)
The native selection is now appropriately hidden when there is a node selection.
Changelog
0.15.0 (2016-12-10)
The editor view no longer wraps its editable DOM element in a wrapper element. The ProseMirror
CSS class now applies directly to the editable element. The ProseMirror-content
CSS class is still present for ease of upgrading but will be dropped in the next release.
The editor view no longer draws a drop cursor when dragging content over the editor. The new prosemirror-dropcursor
module implements this as a plugin.
Simple typing and backspacing now gets handled by the browser without ProseMirror redrawing the touched nodes, making spell-checking and various platform-specific input tricks (long-press on OS X, double space on iOS) work in the editor.
Improve tracking of DOM nodes that have been touched by user changes, so that updateState
can reliably fix them.
Changes to the document that happen while dragging editor content no longer break moving of the content.
Adding or removing a mark directly in the DOM (for example with the bold/italic buttons in iOS' context menu) now produces mark steps, rather than replace steps.
Pressing backspace at the start of a paragraph on Android now allows key handlers for backspace to fire.
Toggling a mark when there is no selection now works better on mobile platforms.
Introduces an endOfTextblock
method on views, which can be used to find out in a bidi- and layout-aware way whether the selection is on the edge of a textblock.