| am_get_last_local_change | R Documentation |
Returns the most recent change created by this document's actor. Useful for tracking local changes or implementing undo/redo functionality.
am_get_last_local_change(doc)
doc |
An Automerge document |
A raw vector containing the serialized change, or NULL if no
local changes have been made.
doc <- am_create()
# Initially, no local changes
am_get_last_local_change(doc) # NULL
# Make a change
doc$key <- "value"
am_commit(doc, "Add key")
# Now we have a local change
change <- am_get_last_local_change(doc)
str(change) # Raw vector
am_close(doc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.