treora / quoteurl Goto Github PK
View Code? Open in Web Editor NEWAllow URLs to point to any text piece in a document
Allow URLs to point to any text piece in a document
When dereferencing a URL, the page should scroll to the highlighted text.
Whitespace in the text (including indentation in the source) is considered part of the quoted text and needlessly befouls the URL. Whitespace handling might also be the cause of issues with locating the quote (issue #3). Reducing any whitespace to a single space may make sense.
Besides, spaces turn into %20
when url-encoded, which is ugly too; converting them to +
or something else may give more readable URLs.
Quoting a longer text now creates huge URLs, which could easily be shortened while remaining uniquely resolvable. The most traditional and human-readable approach would be ellipsis: "ipsum dolor ... diam lectus."
.
Possibly extra information could be added to increase robustness and verify the contents are correct. A hash of the string, or maybe just the length of the omitted part. I feel however that robustness to text modifications should be accomplished at a higher (document-)level, and making sure that the quote identifier was unambiguous in the first place is a matter that must be solved generally (issue #1; disambiguation could in this case be achieved by adding prefix/suffix as well as by removing less quoted words).
Not sure what is different there.
It's already done...mostly. ๐
http://w3c.github.io/web-annotation/selector-note/#json-examples-converted-to-fragment-identifiers
Also, checkout @tilgovi's recent plnkr:
http://run.plnkr.co/plunks/FJibLnSRElKG3k5s5jH9/
As you highlight stuff it shows the various representations of the selection (one of which is a Web Annotation). If you (in a very recent Firefox at least) copy the text, click someplace else in the doc (to remove the select), and then "Ctrl + V"/paste it will reanchor the selection using the Web Annotation it stored in the clipboard.
Next up, imagine editors being smart enough to accept a Web Annotation paste and give you options for how you want to present the citation in your markup (with them keeping the Web Annotation data in RDFa). Pretty sure this is the sort of thing @csarven day dreams about also. ๐ธ
Each time selection changes the URL changes, and a new point is added to the browser history, so clicking back through history takes ages.
When selected text appears multiple times, simply quoting the exact text is insufficient. Such a situation could be detected and acted upon while creating the URL. The TextQuoteSelector supports specifying a prefix and suffix text to disambiguate. Another approach is to combine the quote with different selector types; a TextPositionSelector would work, and noting the closest named anchor would also prevent some ambiguities.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.