I am trying to deserialize the Selection object so I can restore it later, but it seems that the rangy.serializeSelection(sel, checksum, root) method is not working with the native browser's Selection as the parameter.
Below is a snippet of my code:
var selection = window.getSelection();
var serializedSel = rangy.serializeSelection(selection, false, document.getElementById("content"));
And the error I'm getting is:
Error in Rangy WrappedSelection module: getNativeSelection(): Parameter must be a Window object or DOM node
Hi there, thanks for this great library.
I am trying to deserialize the Selection object so I can restore it later, but it seems that the
rangy.serializeSelection(sel, checksum, root)
method is not working with the native browser's Selection as the parameter.Below is a snippet of my code:
And the error I'm getting is:
Error in Rangy WrappedSelection module: getNativeSelection(): Parameter must be a Window object or DOM node
Am I missing something here? Thanks a lot.