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 support for creating RichText or InlineImages using filters #581

Open
hurek opened this issue Jan 16, 2025 · 0 comments
Open

Add support for creating RichText or InlineImages using filters #581

hurek opened this issue Jan 16, 2025 · 0 comments

Comments

@hurek
Copy link

hurek commented Jan 16, 2025

Is your feature request related to a problem? Please describe.

I am developing a universal microservice for generating reports, and it would be convenient to be able to specify in advance all available filters that convert text to rich text, adjust colors, etc., convert a link or file path to InlineImage, etc.

It is very painful for me to hardcode the available operations for each type of report. And instead of editing in two places (the template and the service that sends the generation request with the context), it would be great to describe all this once in the reporting service, and then solve everything using the template.

Describe the solution you'd like

I think the syntax could be something like
{{ image_id|image_from_id(400, 400) }} # download image by id and set imgsize 400x400
{{ image_content|image_from_base64(400,400) }} # convert bs64 string to image and set imgsize 400x400
{{ news_header|to_rich_text(arg1,arg2,arg3) }}

Describe alternatives you've considered

If my task can be solved using the existing code base, please tell me how it can be implemented? I would like to avoid hardcoding inside the python service (except hardcode universal functions, the use of which can be defined in the template)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant