Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

You can put your content into a <div id="recipeXYZ"> nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original pag...

posted 5y ago by AGirlHasNoName‭  ·  last activity 5y ago by System‭

Answer
#3: Attribution notice added by user avatar System‭ · 2019-12-08T11:39:48Z (about 5 years ago)
Source: https://writers.stackexchange.com/a/44460
License name: CC BY-SA 3.0
License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision by user avatar AGirlHasNoName‭ · 2019-12-08T11:39:48Z (about 5 years ago)
You can put your content into a `<div id="recipeXYZ">` nested normally within your blog post. Then you can load the content to a print page dynamically. Now you can print from your original page, with its images and story, or from your print page, which is more printer friendly. You can also modify your recipe from one central location and have it update both pages as they both always receive their content from the same source.

To generate the print page just add the button:

    <span id="printPreview">printer friendly version (requires javascript)</span>
    
    $("#printPreview").click(function(){
        var w = window.open(); // you can change the dimenstions of the window here.
        w.document.open().write("#recipeXYZ");
        // you probably want to create the actual print button here.
    });

#1: Imported from external source by user avatar System‭ · 2019-04-08T01:13:28Z (over 5 years ago)
Original score: 5