Explorar o código

Docs: Added better explanation for `UndoEngine` mechanism.

Szymon Cofalik %!s(int64=8) %!d(string=hai) anos
pai
achega
070eb4392d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      packages/ckeditor5-undo/src/undoengine.js

+ 3 - 0
packages/ckeditor5-undo/src/undoengine.js

@@ -68,6 +68,9 @@ export default class UndoEngine extends Plugin {
 
 			// Do not register batch if the operation is not a document operation.
 			// This prevents from creating empty undo steps, where all operations where non-document operations.
+			// Non-document operations creates and alters content in detached tree fragments (for example, document fragments).
+			// Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).
+			// Such operations should not be reversed.
 			if ( !operation.isDocumentOperation ) {
 				return;
 			}