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

Add option to specify a type for Highlighter serialization #291

Merged
merged 1 commit into from
Mar 20, 2015

Conversation

jonbrooks
Copy link

Optionally allow clients to specify a type for highlighter serialization different from the highlighter's type. In this way, clients can use the more responsive textContent type for creating highlights, but serialize the highlights into a TextRange format for better consistency across browsers.

Code play the same game done in deserialize that converts from one type to another when necessary.

If this doesn't fit with your roadmap, feel free to ignore, but I thought this might be of use to others. If there is a good reason why this is a bad idea, I'd love to hear it.

@timdown timdown merged commit 5d84768 into timdown:master Mar 20, 2015
@timdown
Copy link
Owner

timdown commented Mar 20, 2015

Yep, I like this. Thanks very much.

@jonbrooks
Copy link
Author

Great. Glad you liked it.

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

Successfully merging this pull request may close these issues.

2 participants