Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
30475c01
Commit
30475c01
authored
Sep 07, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add publisher documentation about annotating iframed content.
parent
1dbd4904
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
embedding.rst
docs/publishers/embedding.rst
+28
-0
No files found.
docs/publishers/embedding.rst
View file @
30475c01
...
@@ -13,3 +13,31 @@ each page that you want to have the Hypothesis client on:
...
@@ -13,3 +13,31 @@ each page that you want to have the Hypothesis client on:
.. code-block:: html
.. code-block:: html
<script src="https://hypothes.is/embed.js" async></script>
<script src="https://hypothes.is/embed.js" async></script>
Enabling annotation of iframed content
--------------------------------------
The simplest way to support annotation of iframed content is to add the
above script tag to the document displayed in the iframe. This will display the
sidebar in the iframe itself.
Additionally Hypothesis has limited support for enabling annotation of iframed
content while showing the sidebar in the top-level document. To use this:
1. Add the above script tag to the top-level document
2. Do not add the script tag to the iframed documents themselves, the client
will do this itself.
3. Opt iframes into annotation by adding the "enable-annotation" attribute:
.. code-block:: html
<iframe enable-annotation>
...
</iframe>
This method *only* works for iframes which are same-origin with the top-level
document. The client will watch for new iframes being added to the document and
will automatically enable annotation for them.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment