Jump to content
Sign in to follow this  
Squishy Crayons

Best way to incorporate long essays in a website?

Recommended Posts

Disclaimer: I'm a total n00b, chances are I won't understand what you tell me so please dumb it downI'm currently working on a project for my English class. There are about 30 people in the class and they all have essays about 15-20 pages in length (MSFT Word, 12-pt, Times New Roman, double-spaced, etc, etc) I have to add all of their essays in the website when you click on a link of their nameI tried just copying and pasting the entire essay between <p></p> and man was it UUUUUUUGGGGGGLYY! First of all my container is only about 400 px wide and it was all squished together. On top of that no paragraph breaks, no indention, no coherency.Is there code which can make a dynamic Javascript or DHTML popup which displays the essays with the same formatting they have in MSFT Word? Or perhaps even PDF?Again I'm a total n00b and have no idea how to do most things.

Share this post


Link to post
Share on other sites

I can't really say how it could be done other than manually redoing it. By manually redoing it I mean where ever there's a new paragraph you either end the <p> and start a new one or insert a <br /> (the first is the better way).What I can say is that it probably won't be easy to do it programmatically. The reason I say that is because Word produces a lot of weird characters that aren't recognized in HTML. You can maybe try saving the file as a plain text file instead of a .doc file. Then I think it would be as easy as doing a string search in JavaScript or PHP to replace all newlines with "</p><p>" or "<br />"

Share this post


Link to post
Share on other sites

do the essay's have to be on the page? Maybe you could save them to PDF and they can either d/l them or you could try and embed it into the page.

Share this post


Link to post
Share on other sites
I can't really say how it could be done other than manually redoing it. By manually redoing it I mean where ever there's a new paragraph you either end the <p> and start a new one or insert a <br /> (the first is the better way).What I can say is that it probably won't be easy to do it programmatically. The reason I say that is because Word produces a lot of weird characters that aren't recognized in HTML. You can maybe try saving the file as a plain text file instead of a .doc file. Then I think it would be as easy as doing a string search in JavaScript or PHP to replace all newlines with "</p><p>" or "<br />"
Nah... they're long essays and it would be a pain in the *** (is that word allowed here?) to manually do even if I used a script (which I don't even begin to understand). Besides my container is only 400px wide and it just doesn't look right seeing a long essay crammed into such a small space.
do the essay's have to be on the page? Maybe you could save them to PDF and they can either d/l them or you could try and embed it into the page.
PDF sounds good if I could find a way to nicely embed it.You guys ever heard of a lightbox image gallery? Would it be possible to do something like that where a dynamic popup window opens and there's a PDF embedded inside?

Share this post


Link to post
Share on other sites

Yephttp://jquery.com/demo/thickbox/Although its no longer supported, its probably the simplest to implement and to follow. Scroll down the page to find the iframe content which is what you need.However - not all people's browsers are going to open the PDF inside the browser, some will automagically save it, or ask the user to save it - this you cant control.

Share this post


Link to post
Share on other sites

Thanks real_illusionsthickbox looked like it might work but then I saw some other 'boxes' at the top of the page. I figured these were all variations or clones of lightbox so I just did a quick google search for "lightbox pdf" and voila, I found bumpbox. It's looks similar to thickbox (I don't really know whatt's inside the script files of either) and it did the trick :)http://www.artviper.net/website-tools/bumpbox-lightbox.phpThanks for you help guys.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...