Revize b5f60842
Přidáno uživatelem Lukáš Vlček před téměř 3 roky(ů)
webapp/README.md | ||
---|---|---|
1 |
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
|
2 |
|
|
3 |
## Getting Started |
|
4 |
|
|
5 |
First, run the development server: |
|
6 |
|
|
7 |
```bash |
|
8 |
npm run dev |
|
9 |
# or |
|
10 |
yarn dev |
|
11 |
``` |
|
12 |
|
|
13 |
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
|
14 |
|
|
15 |
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. |
|
16 |
|
|
17 |
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. |
|
18 |
|
|
19 |
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
|
20 |
|
|
21 |
## Learn More |
|
22 |
|
|
23 |
To learn more about Next.js, take a look at the following resources: |
|
24 |
|
|
25 |
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
|
26 |
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
|
27 |
|
|
28 |
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
|
29 |
|
|
30 |
## Deploy on Vercel |
|
31 |
|
|
32 |
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
|
33 |
|
|
34 |
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
webapp/api/api.ts | ||
---|---|---|
32 | 32 |
* @type {string} |
33 | 33 |
* @memberof AnnotationInfo |
34 | 34 |
*/ |
35 |
'documentText'?: string | null; |
|
35 |
'sourceDocumentContent'?: string | null; |
|
36 |
/** |
|
37 |
* |
|
38 |
* @type {string} |
|
39 |
* @memberof AnnotationInfo |
|
40 |
*/ |
|
41 |
'documentToRender'?: string | null; |
|
42 |
/** |
|
43 |
* |
|
44 |
* @type {Array<number>} |
|
45 |
* @memberof AnnotationInfo |
|
46 |
*/ |
|
47 |
'tagStartPositions'?: Array<number> | null; |
|
48 |
/** |
|
49 |
* |
|
50 |
* @type {Array<number>} |
|
51 |
* @memberof AnnotationInfo |
|
52 |
*/ |
|
53 |
'tagLengths'?: Array<number> | null; |
|
36 | 54 |
/** |
37 | 55 |
* |
38 | 56 |
* @type {EState} |
webapp/components/annotation/DocumentAnnotationView.tsx | ||
---|---|---|
15 | 15 |
|
16 | 16 |
return ( |
17 | 17 |
<div> |
18 |
<Button |
|
19 |
onClick={() => { |
|
20 |
console.log(window.getSelection()); |
|
21 |
}} |
|
22 |
> |
|
23 |
Test |
|
24 |
</Button> |
|
25 |
<div dangerouslySetInnerHTML={{ __html: annotation.documentText ?? '' }} /> |
|
18 |
<div |
|
19 |
dangerouslySetInnerHTML={{ __html: annotation.documentToRender ?? '' }} |
|
20 |
/> |
|
26 | 21 |
</div> |
27 | 22 |
); |
28 | 23 |
} |
Také k dispozici: Unified diff
Document preview on frontend