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
89409e56
Commit
89409e56
authored
Jan 30, 2024
by
Alejandro Celaya
Committed by
Alejandro Celaya
Jan 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document how to set clipboard-write permission
parent
a185d1ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
embedding.rst
docs/publishers/embedding.rst
+25
-0
No files found.
docs/publishers/embedding.rst
View file @
89409e56
...
@@ -44,3 +44,28 @@ document and have the same origin.
...
@@ -44,3 +44,28 @@ document and have the same origin.
The client will watch for new iframes being added to the document and will
The client will watch for new iframes being added to the document and will
automatically enable annotation for them.
automatically enable annotation for them.
Clipboard permissions when loaded in an iframe
----------------------------------------------
There are a few places in the sidebar where the user can copy content to the
clipboard, such as exporting or copying links to annotations.
This functionality uses the browser's
`Clipboard API <https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API>`_,
which requires allowing the ``clipboard-write`` permission in Chrome (but not
Safari or Firefox).
When loading the sidebar in the top-level document, this will work automatically
but if you load Hypothesis inside an iframe, you will need to add an ``allow``
attribute with the right permissions.
.. code-block:: html
<iframe allow="clipboard-write">
<!-- Hypothesis is loaded here -->
</iframe>
If these permissions are not available, the corresponding functionality in
Hypothesis will either be unavailable or will fail with an error when used.
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