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
{{ message }}
Repository navigation
Commit fb765b6
Browse filesBrowse the repository at this point in the historyBrowse files
Update pdfjs-viewer documentation and add logo SVG asset
- Revised the description in the pdfjs-viewer documentation to clarify the functionality of the Try and Reset buttons.
- Removed the 'try' attribute from the HTML example for the pdfjs-viewer element.
- Added a new SVG logo asset to the project.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,4 +37,5 @@ Add `try` after the language of a code fence to give it a **▶ Try** button tha
37
37
38
38
-**HTML snippets** copy the attributes of their `<pdfjs-viewer-element>` onto the preview. `style`, `id`, `class` and the placeholder `src="/file.pdf"` are skipped.
39
39
-**JavaScript snippets** run exactly as written. `document.querySelector('pdfjs-viewer-element')` returns the preview element.
40
+
- Every Try button comes with a **Reset** button that puts the preview back to its defaults.
40
41
-**`try=fresh`** replaces the preview with a new element first. Use it for settings that only apply when the viewer is built, such as `setViewerOptions` and the "before connect" attributes.
return`<form class="playground" data-playground aria-label="Attribute playground">${controls}<p class="playground-hint">Changes apply to the preview as you edit them.</p></form>`;
99
+
return`<form class="playground" data-playground aria-label="Attribute playground"><p class="playground-hint">Each change applies to the live preview straight away.</p>${controls}</form>`;
<pclass="lead">A self-hostable PDF viewer web component, based on the <ahref="https://mozilla.github.io/pdf.js/web/viewer.html">PDF.js default viewer</a>.</p>
0 commit comments