You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A UI component that renders a multicanvas IIIF item viewer with pan-zoom support for `Image` via [OpenSeadragon](https://openseadragon.github.io/) and `Video` and `Sound` content resources using the [HTML video element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video).
|`iiifContentSearchQuery`|[See Content Search](#content-search)| No ||
149
156
|`canvasIdCallback`|`function`| No ||
157
+
|`contentStateCallback`|[See IIIF Content State](#iiif-content-state)| No ||
150
158
|`customDisplays`|[See Custom Displays](#custom-displays)| No ||
151
159
|`customTheme`|`object`| No ||
152
160
|`plugins`|[See Plugins](#plugins)| No ||
@@ -284,9 +292,56 @@ Clients may wish to use their own display components (for example a PDF Viewer,
284
292
|`customDisplays.target.canvasId`|`string[]`| No ||
285
293
|`customDisplays.target.paintingFormat`|`string[]`| No ||
286
294
287
-
### Content search
295
+
### IIIF Content State
296
+
297
+
Clover supports IIIF Content State in multiple ways. This specifications allows you to render a provided state to the Viewer component, including the active canvas, a `xywh` or `t` selector, and body which might be textual content. The Clover Viewer can both provide the current state of a component and render a given state.
298
+
299
+
#### Content State Callback
300
+
301
+
You can use the `contentStateCallback` prop to receive the current content state as a base64 encoded JSON string and as raw JSON. Using this, you can provide a consuming application the view of the user. This could helpful for sharing or storing the state for later use by a user. To review this further, see [Content State](viewer/content-state).
Clover supports IIIF content search v2. In order to display content search in the information panel, add a content search service to the manifest.
342
+
### IIIF Content Search
343
+
344
+
Clover supports IIIF Content Search v2. In order to display content search in the information panel, add a content search service to the manifest.
290
345
291
346
```json
292
347
{
@@ -478,11 +533,13 @@ Additional CSS classes are made available on structural HTML elements in the Vie
478
533
-[Ruby](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ruby) (`<ruby/>`) and [Ruby Text](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rt) (`<rt/>`)
479
534
480
535
- Several WebVTT-specific tags are processed in special ways:
536
+
481
537
- Voice Tags (e.g., `<v speaker>Caption</v>`) are wrapped in `<span title="speaker"/>` and can be styled using the CSS selector `.webvtt-cue span[title="speaker"]`
482
538
- Class Tags (e.g., `<c.classToAdd>Caption</c>`) are wrapped in `<span class="classtoAdd"/>` and can be styled using the CSS selector `.webvtt-cue span.classToAdd`
483
539
- Language Tags (e.g., `<lang.en-US>English Caption</lang>`) are handled the same as Class Tags - wrapped in `<span class="en-US"/>` and can be styled using the CSS selector `.webvtt-cue span.en-US`
484
540
485
541
- WebVTT CSS extensions (`STYLE` blocks and `::cue` pseudo-elements) are not supported
Copy file name to clipboardExpand all lines: pages/docs/viewer/content-state.mdx
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,21 @@ This is a helper page to demonstrate the retrieving the current IIIF Content Sta
86
86
87
87
### Current Content State
88
88
89
-
This section displays the raw JSON and base64 encoded JSON of the IIIF Content State for this Viewer instance. <ahref="#"id="content-state-preview">Preview</a> the current content state of the Viewer component, which
89
+
This section displays the raw JSON and base64 encoded JSON of the IIIF Content State for this Viewer instance. Preview the current content state of the Viewer component, which
90
90
includes information about the currently displayed canvas, zoom level, and other
91
91
relevant details. This can be useful for debugging or for saving the state of
92
92
the viewer.
93
93
94
+
<divstyle={{ marginTop: "1rem" }}>
95
+
<CallToAction
96
+
href="/docs/viewer"
97
+
text="Preview Content State"
98
+
size="small"
99
+
id="content-state-preview"
100
+
target="_blank"
101
+
/>
102
+
</div>
103
+
94
104
<div
95
105
style={{
96
106
display: "flex",
@@ -113,7 +123,7 @@ the viewer.
113
123
fontSize: "0.833rem",
114
124
resize: "none",
115
125
}}
116
-
placeholder='Enter any body text here to see how it is displayed in the viewer'
126
+
placeholder='Enter any body text here to see how it is displayed in the viewer. Note that character lenghts longer than a few hundred characters may not display correctly in the viewer due to limitations in browser maxchar lengths.'
0 commit comments