feat: Add text editor
All checks were successful
/ pre-commit (push) Successful in 1m45s

Use Monaco Editor to create notes. Support syntax highlighting. Store the
language with the note in the database to later support syntax highlighting in
a note web view.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2025-08-27 22:42:12 +02:00
parent b45c3e3253
commit c54f32495b
Signed by: jriou
GPG key ID: 9A099EDA51316854
9 changed files with 170 additions and 24 deletions

View file

@ -31,6 +31,8 @@ The file format is **JSON**:
* **prometheus_route** (string): Route to expose Prometheus metrics (default "/metrics")
* **prometheus_notes_metric** (string): Name of the notes count metric (default "collerd_notes")
* **observation_internal** (int): Number of seconds to wait between two observations (default 60)
* **languages** ([]string): List of supported [languages](https://github.com/microsoft/monaco-editor/tree/main/src/basic-languages)
* **language** (string): Default language (default "text")
The configuration file is not required but the service might not be exposed to the public.
@ -50,6 +52,7 @@ Body (JSON):
* **encrypted** (bool): true if the content has been encrypted by the client
* **expiration** (int): lifetime of the note in seconds (must be supported by the server)
* **delete_after_read** (bool): delete the note after the first read
* **language** (string): language of the note (must be supported by the server)
Response (JSON):
* **id** (string): ID of the note