forked from jriou/coller
feat: Add text editor
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:
parent
b45c3e3253
commit
c54f32495b
9 changed files with 170 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue