|
1 | | -# QtiEditorAngular |
2 | 1 |
|
3 | | -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.6. |
| 2 | +# QTI Editor Angular Extension |
4 | 3 |
|
5 | | -## Development server |
| 4 | +This project is an example Angular integration of the [qti-editor](https://github.com/Citolab/qti-editor) ecosystem. It demonstrates how to integrate QTI Editor’s modular, ProseMirror-based authoring environment into an Angular application, using the recommended public packages and UI registry approach. |
6 | 5 |
|
7 | | -To start a local development server, run: |
| 6 | +**Live Demo:** [https://citolab.github.io/qti-editor-angular/](https://citolab.github.io/qti-editor-angular/) |
8 | 7 |
|
9 | | -```bash |
10 | | -ng serve |
11 | | -``` |
| 8 | +--- |
12 | 9 |
|
13 | | -Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. |
| 10 | +## About |
14 | 11 |
|
15 | | -## Code scaffolding |
| 12 | +This application is designed to showcase and extend the capabilities of the main [qti-editor](https://github.com/Citolab/qti-editor) repository. It provides a reference implementation for embedding QTI-compliant authoring tools in Angular apps, following the best practices outlined in the [qti-editor documentation](https://qti-editor.citolab.nl/docs). |
16 | 13 |
|
17 | | -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: |
| 14 | +The editor is built on [ProseMirror](https://prosemirror.net/) and leverages QTI-specific schema nodes, commands, and web components. This ensures that authored content is always valid QTI and that only supported interactions and structures are allowed. |
18 | 15 |
|
19 | | -```bash |
20 | | -ng generate component component-name |
21 | | -``` |
| 16 | +## Integration Approach |
22 | 17 |
|
23 | | -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: |
| 18 | +- Install the required `@qti-editor` interaction and core packages from npm. |
| 19 | +- Use [ProseKit](https://prosekit.dev) for ready-made UI components, or copy example Lit UI components from the registry. |
| 20 | +- Maintain a small local ProseKit helper layer for editor assembly and event wiring. |
| 21 | +- The intended public model is: `prosekit` + `@qti-editor/interaction-*` + `@qti-editor/core` + copied registry UI. |
24 | 22 |
|
25 | | -```bash |
26 | | -ng generate --help |
27 | | -``` |
| 23 | +For more details, see the [Angular integration guide](https://qti-editor.citolab.nl/docs/frameworks/angular/). |
28 | 24 |
|
29 | | -## Building |
| 25 | +## Development |
30 | 26 |
|
31 | | -To build the project run: |
| 27 | +To start a local development server: |
32 | 28 |
|
33 | 29 | ```bash |
34 | | -ng build |
| 30 | +ng serve |
35 | 31 | ``` |
36 | 32 |
|
37 | | -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. |
| 33 | +Visit `http://localhost:4200/` in your browser. The app will reload automatically on code changes. |
38 | 34 |
|
39 | | -## Running unit tests |
| 35 | +## Building |
40 | 36 |
|
41 | | -To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command: |
| 37 | +To build the project for production: |
42 | 38 |
|
43 | 39 | ```bash |
44 | | -ng test |
| 40 | +ng build --configuration production --base-href /qti-editor-angular/ |
45 | 41 | ``` |
46 | 42 |
|
47 | | -## Running end-to-end tests |
| 43 | +The build output will be in the `dist/` directory. This project is automatically deployed to GitHub Pages on every push to `main`. |
48 | 44 |
|
49 | | -For end-to-end (e2e) testing, run: |
| 45 | +## Testing |
| 46 | + |
| 47 | +To run unit tests: |
50 | 48 |
|
51 | 49 | ```bash |
52 | | -ng e2e |
| 50 | +ng test |
53 | 51 | ``` |
54 | 52 |
|
55 | | -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. |
| 53 | +## Resources |
| 54 | + |
| 55 | +- [QTI Editor Documentation](https://citolab.github.io/qti-editor/) |
| 56 | +- [QTI Editor Angular Integration Guide](https://citolab.github.io/qti-editor/docs/frameworks/angular/) |
| 57 | +- [Main qti-editor repository](https://github.com/Citolab/qti-editor) |
| 58 | +- [ProseKit](https://prosekit.dev) |
56 | 59 |
|
57 | | -## Additional Resources |
| 60 | +--- |
58 | 61 |
|
59 | | -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. |
| 62 | +For questions or contributions, please see the main [qti-editor](https://github.com/Citolab/qti-editor) repository. |
0 commit comments