Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "notes_html" field to API #627

Open
perrotuerto opened this issue Feb 10, 2024 · 4 comments
Open

Add "notes_html" field to API #627

perrotuerto opened this issue Feb 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@perrotuerto
Copy link

perrotuerto commented Feb 10, 2024

I wonder if it is possible to add a "notes_html" field to the api that reuses the shared render of bookmark.notes as its value. It would help to keep the same HTML structure across different services/uses.

@sissbruecker
Copy link
Owner

Eh, maybe? Should be an optional thing though, maybe to be enabled with a query param.

@sissbruecker sissbruecker added the enhancement New feature or request label Mar 16, 2024
@perrotuerto
Copy link
Author

Thanks for the reply, @sissbruecker, may be something like:

GET /api/bookmarks/<id>/html/

I will like to help you with this!

@sissbruecker
Copy link
Owner

Hmm, adding a separate endpoint seems a bit convoluted. If more options like these are added then you would end up with a large number of routes, plus combinations of those. I was thinking more about a query param to control this: GET /api/bookmarks/<id>/?notes_html. Also wondering if this should work for the list endpoint as well.

Apart from that the markdown rendering logic should be extracted into a class maybe, so that it can be used in both the template tag and in the API serializer.

@perrotuerto
Copy link
Author

perrotuerto commented Mar 21, 2024

With the list? Do you mean the tags?

GET /api/bookmarks/<id>/?notes_html that retrieves the HTML format of the notes by a new class for the markdown formatter sounds good to me. I will start to work with the development setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants