Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Deserialize the selected Range? #1

Open
inventionlabs opened this issue Jul 19, 2012 · 5 comments
Open

How to Deserialize the selected Range? #1

inventionlabs opened this issue Jul 19, 2012 · 5 comments

Comments

@inventionlabs
Copy link

Hi,
This is a amazing work in android webview. Thanks for the effort. Presently I am try to make a selection in webview and save it in the android DB. I am able to save the serialized string from your code but I am not able to deserialize the string. I am getting this error
"Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1"

when I call the rangy.deserialize(selectedrange).

Please help me to save and highlight the text in webview by using your excellent idea.

Thank You,
Abu Saad Papa

@btate
Copy link
Owner

btate commented Jul 19, 2012

Try this,

var highlightRange = rangy.deserializeSelection(selectedrange);
var range = rangy.getSelection();

@BijayaGuin
Copy link

Hi,
i am trying to implement deserialize the Selection, for that i using rangy.deserializeSelection(selectedrange); methode.
in javascript layer it throughing error
"jserror: Undefined" at b.setEnd(a.node,a.offset); in function q(c,a,b) of rangy-serializer.js file.

Please Help me for this issue.

Bijaya Guin

@btate
Copy link
Owner

btate commented Oct 4, 2012

Can you send me some code? Not sure what you're doing to get that error.

@BijayaGuin
Copy link

Hi,
I am able to make a selection in webview and able to save the serialized selection value in android DB .
at the time of deserialize, i am getting serialized selection value from DB and i used below methode for deserialized.

var highlightRange = rangy.deserializeSelection(selectedrange);

then am getting this error::
JSError: deserializeRange: checksums of serialized range root node (a88e5b11) and target root node (f24b7ae8) do not match.

One thing i noticed, when i select some content from webview it gives a serialized String value. if again i am
selecting same content it gives different serialized String value.

Thank you,
Bijaya Guin

@Neernay
Copy link

Neernay commented Jun 6, 2013

Hi BijayaGuin

did you got any solution for deserialize? I am also having the same problem.
I am not able to deserialize the selection.

btate, can you help?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants