-
Notifications
You must be signed in to change notification settings - Fork 96
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 images to recipe steps #47
Comments
I don't think it would be of much benefit, since Markdown just generates HTML, and that would just be noise in the JSON format that we're following: http://uischema.org/Recipe. However, we could still add support for images on a per-step basis, since the "recipeInstructions" field can take an ItemList of ListItem, which is based on Thing, which has an "image" field. TL;DR: No markdown, yes images. |
I've been thinking about this too, I think markdown would be useful, personally I like to mark recipe ingredients in bold (because I have a habit of skipping over them and not adding them). |
@mrzapp That makes sense. Adding support for images in the steps would be a nice improvement! |
@mrzapp: Just out of cuiosity: Whouldn't it be benefical to store the Markdown in the DB/JSON instead of the parsed HTML and do the Markdown->HTML conversion on the fly or in a separate cache? Then the JSON is comparably clean. |
@christianlupus I see your point, that might work. That also makes markdown optional, which is nice. In most cases though, the recipes are fetched from a remote resource presenting HTML, which is stripped, so markdown is only really supported when entered manually. I think we can just render the markdown client side, it's super quick. |
I do not know how the stripping is done exactly. However I assume this is done in the regexes in this file. Maybe one could tweak them to keep some basic formatting (like |
@christianlupus yeah, it's this line, which uses this method. If we want to preserve the formatting from fetched HTML, we might as well use this library to convert it to markdown and this one to convert it back when presenting it. You want to take a swing at this? Otherwise I'll get to it eventually. |
@mrzapp I am a bit short in time at the moment as I just returned from holidays and I have some pressing things at hands. So I will unfortunately not find much time in the next few weeks to code much, sorry. The libraries look really good. Put them as a submodule and much of the issue should be gone within a short period of time. |
@christianlupus just to summarise the solution for this issue:
How does that sound to you? Please feel free to challenge any of the points, they're not set in stone :) |
Not sure if this should be a separate feature request, but multiple images wouldn't only be useful for the steps, but for the main image itself. For example, before I make a recipe, I'll use the image from the website I got it from. After I've made a recipe, I'd love to add one or more photos of how it actually turned out. If a family member makes it, they might do the same. |
Yes, it should be - and it is ;) |
Any progress? |
Unfortunately no. |
This PR/issue depends on: |
I would also love to see the feature of being able to add images to each of the steps within a recipe as we're using cookbook as a technical manual in which we miss the opportunity to add screenshots as a means of giving visual instruction for each step in the recipe. Like in this comment box I am able to format my text but also attach files, but for the recipe-steps the images should be inline similar to what the header image for the recipe is at the top. |
this feature will make this app perfect! |
We need a way to store the images, thus the dependency on #340. |
The Markdown feature would be greatly appreciated! 😇 |
I really like this app! Is it possible to add support for Markdown? I'd like to format the recipe a bit as well as reference multiple image files within the recipe itself.
Depends on #1133
Depends on #340
The text was updated successfully, but these errors were encountered: