-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
230 additions
and
12 deletions.
There are no files selected for viewing
Submodule .gh-pages
added at
b19e41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup> | ||
import { VuePDF, usePDF } from '@tato30/vue-pdf'; | ||
import '@tato30/vue-pdf/style.css'; | ||
import { ref } from 'vue'; | ||
const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') | ||
const highlightText = ref('javascript') | ||
const highlightOptions = ref({ | ||
completeWords: false, | ||
ignoreCase: true, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<table> | ||
<tr> | ||
<td colspan="2"> | ||
Text | ||
</td> | ||
<td colspan="2"> | ||
<input v-model="highlightText" class="input-example"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Complete words</td> | ||
<td><input v-model="highlightOptions.completeWords" type="checkbox" class="checkbox-example"></td> | ||
<td>Ignore case</td> | ||
<td><input v-model="highlightOptions.ignoreCase" type="checkbox" class="checkbox-example"></td> | ||
</tr> | ||
</table> | ||
|
||
<VuePDF :scale="1.1" :pdf="pdf" text-layer :highlight-text="highlightText" :highlight-options="highlightOptions" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup> | ||
import { VuePDF, usePDF } from '@tato30/vue-pdf'; | ||
import '@tato30/vue-pdf/style.css'; | ||
import { ref } from 'vue'; | ||
const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') | ||
const highlightText = ref('Trace-based') | ||
const highlightOptions = ref({ | ||
completeWords: false, | ||
ignoreCase: true, | ||
}) | ||
const eventValue = ref({}) | ||
function onHighlight(value) { | ||
console.log(value) | ||
eventValue.value = value | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<table> | ||
<tr> | ||
<td colspan="2"> | ||
Text | ||
</td> | ||
<td colspan="2"> | ||
<input v-model="highlightText" class="input-example"> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<VuePDF :scale="1.1" :pdf="pdf" text-layer :highlight-text="highlightText" :highlight-options="highlightOptions" @highlight="onHighlight" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Highlight Text | ||
|
||
```vue | ||
<script setup> | ||
import { VuePDF, usePDF } from '@tato30/vue-pdf'; | ||
import '@tato30/vue-pdf/style.css'; | ||
import { ref } from 'vue'; | ||
const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') | ||
const highlightText = ref('javascript') | ||
const highlightOptions = ref({ | ||
completeWords: false, | ||
ignoreCase: true, | ||
}) | ||
</script> | ||
<template> | ||
<div> | ||
<div> | ||
<input v-model="highlightText"> | ||
<input v-model="highlightOptions.completeWords" type="checkbox"> | ||
<input v-model="highlightOptions.ignoreCase" type="checkbox"> | ||
</div> | ||
<VuePDF :pdf="pdf" text-layer :highlight-text="highlightText" :highlight-options="highlightOptions" /> | ||
</div> | ||
</template> | ||
``` | ||
<ClientOnly> | ||
<HighlightText /> | ||
</ClientOnly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Highlight Event | ||
|
||
::: warning | ||
Highlight event payload has too much data to display on screen, open the console instead. | ||
::: | ||
|
||
```vue | ||
<script setup> | ||
import { VuePDF, usePDF } from '@tato30/vue-pdf' | ||
import '@tato30/vue-pdf/style.css' | ||
import { ref } from 'vue' | ||
const { pdf } = usePDF('https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf') | ||
const highlightText = ref('Trace-based') | ||
const highlightOptions = ref({ | ||
completeWords: false, | ||
ignoreCase: true, | ||
}) | ||
function onHighlight(value) { | ||
console.log(value) | ||
} | ||
</script> | ||
<template> | ||
<div> | ||
<input v-model="highlightText"> | ||
<VuePDF :pdf="pdf" text-layer :highlight-text="highlightText" :highlight-options="highlightOptions" @highlight="onHighlight" /> | ||
</div> | ||
</template> | ||
``` | ||
|
||
<ClientOnly> | ||
<TextHighlight /> | ||
</ClientOnly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,6 @@ | |
"vuepress": "2.0.0-beta.62" | ||
}, | ||
"dependencies": { | ||
"@tato30/vue-pdf": "1.8.1" | ||
"@tato30/vue-pdf": "^1.9.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters