prosemirror-view
Advanced tools
Changelog
0.16.0 (2016-12-23)
The spellcheck
, label
, and class
props are now replaced by an attributes
prop.
Solve problem where setting a node selection would trigger a DOM read, leading to the selection being reset.
Ignoring/aborting an action should no longer lead to the DOM being stuck in an outdated state.
Typing at the end of a textblock which ends in a non-text node now actually works.
DOM nodes for leaf document nodes are now set as non-editable to prevent various issues such as stray cursors inside of them and Firefox adding image resize controls.
Inserting a node no longer causes nodes of the same type after it to be neednessly redrawn.
Add a new editor prop editable
which controls whether the editor's contentEditable
behavior is enabled.
Plugins and props can now set any DOM attribute on the outer editor node using the attributes
prop.
Node view constructors and update methods now have access to the node's wrapping decorations, which can be used to pass information to a node view without encoding it in the document.
Attributes added or removed by node and inline decorations no longer cause the nodes inside of them to be fully redrawn, making node views more stable and allowing CSS transitions to be used.
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.
Changelog
0.14.4 (2016-12-02)
Fix issue where node decorations would stick around in the DOM after the decoration was removed.
Setting or removing a node selection in an unfocused editor now properly updates the DOM to show that selection.
Changelog
0.14.2 (2016-11-30)
FIX: Avoid unneeded selection resets which sometimes confused browsers.
Changelog
0.14.1 (2016-11-29)
Restores previously broken kludge that allows the cursor to appear after non-text content at the end of a line.
Changelog
0.14.0 (2016-11-28)
Wrapping decorations are now created using the nodeName
property. The wrapper
property is no longer supported.
The onUnmountDOM
prop is no longer supported (use a node view with a destroy
method instead).
The domSerializer
prop is no longer supported. Use node views to configure editor-specific node representations.
Widget decorations can now be given a key
property to prevent unneccesary redraws.
The EditorView
class now has a destroy
method for cleaning up.
The handleClickOn
prop and friends now receive a direct
boolean argument that indicates whether the node was clicked directly.
Widget decorations now support a stopEvent
option that can be used to control which DOM events that pass through them should be ignored by the editor view.
You can now specify custom node views for an editor view, which give you control over the way node of a given type are represented in the DOM. See the related RFC.