1.1.3 • Published 3 years ago

prosemirror-history-v2 v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

prosemirror-history

[ WEBSITE | ISSUES | FORUM | GITTER | CHANGELOG ]

This is a core module of ProseMirror. ProseMirror is a well-behaved rich semantic content editor based on contentEditable, with support for collaborative editing and custom document schemas.

This module implements an undo/redo history plugin for ProseMirror.

The project page has more information, a number of examples and the documentation.

This code is released under an MIT license. There's a forum for general discussion and support requests, and the Github bug tracker is the place to report issues.

We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.

修改原始的undo redo逻辑, 记录每次修改前后的选区, 用于redo时选区的恢复, 替代原始的当前state的 state.selection.getBookmark

执行undo前更改选区位置, 将不会对重做后的选区造成影响

Modify undo/redo logic. Record old and new selection when doc was changed instead of state.selection.getBookmark()

Selection will not be affected by the selection changing before executing undo