Importing Text

New to web-building ? Simple answers to "How do I . . .?"

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

Importing Text

Postby chzuck on Tue Sep 10, 2013 12:37 pm

I wrote an article for a newsletter and I want to put it on my website. Is there a way to import the text (word document) into a webpage in Kompozer or do I need to retype it into a page?
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby wink0r on Tue Sep 10, 2013 4:36 pm

With a Word document the safest approach is to copy the text to NotePad and then recopy from NotePad and paste onto your page. You will then need to go through the article and reformat the text (apply paragraph and heading tags where necessary).

Word documents have a lot of formatting code that gets copied when you copy the document. Attempting to paste them directly into your page can have unexpected results. NotePad strips all of the background code from the text leaving you with clean unformatted content.
wink0r
 
Posts: 2429
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Importing Text

Postby chzuck on Tue Sep 10, 2013 5:27 pm

Well here is what I tried and it seemed to work. I copied and pasted each paragraph separately, using Paste Without Formatting. I then uploaded the file and checked it with the W3C Markup Validation page and the CSS Validation Service and passed both without errors.
Here is the page: http://www.zucksrototillers.com/FrazerHistory.html I don't have the photos uploaded yet.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby wink0r on Tue Sep 10, 2013 6:13 pm

The paste without formatting option often works but running a full page through NotePad is more positive.
wink0r
 
Posts: 2429
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Importing Text

Postby chzuck on Tue Sep 10, 2013 11:04 pm

Thank you for that advice. I will use that when I convert my next webpage using Kompozer.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby gregtutor on Wed Sep 11, 2013 9:12 am

Hi Charlie,

Just taken a look at your page (now with photos!):
http://www.zucksrototillers.com/FrazerHistory.html

Here's three ideas that will help with still better code as you update the rest of your site:

First, because it's simplest... there are few unnecessary <br> codes in the file.

Tools > Markup cleaner

will take care of that!


Next... You have a heading "The Brief History Of The Frazer Rototiller" tagged as "h2". You have added inline styling to centre this. Presumably all pages will also have this level of heading and you will want them centred to match. You should therefore add a styling rule to your file ZucksRototiller.css:

h2 {text-align: center;}

and remove the inline styling.

Finally, and with somewhat more theory to it...

In your first paragraph you have a magazine title which you have made bold - probably by dragging across it and clicking the bold toolbar button.

As you are likely to refer to other magazines and books on other pages, it would be better to create a styling class in your file ZucksRototiller.css:

strong.magazinetitle {font-weight: bold;}

That way you can drag across any magazine title, then click on the [!!] toolbar button. (That alone will give you the default bold styling for the "strong" tag). However, if you also add the styling class above, you have the opportunity later to change your mind and make magazine titles italic instead. You'd just change the rule to:

strong.magazinetitle {font-weight: normal; font-style: italic;}

In the ideal world, you wouldn't use either "strong" [!!] or "emphasis" [!] for this. You would use "cite" as that is the tag deliberately created for titles of magazines or newspapers, ship names, references to other sources, and quotation attributions. However, KompoZer makes that a little harder to enter as there is no button provided. Instead you have to select the text, then go to:

Insert > HTML

and add the <cite></cite> tags manually around the selected text which then appears in the dialogue.

(If there's more than one title per page, it's probably easier to use search and replace on the source code to replace "strong>" with "cite>")

Of course if you really want the magazine title in bold rather than the conventional italics, you would need to add a styling rule for "cite" to remove the italics and add the bold:

cite {font-style: normal; font-weight: bold;}

Finally, I should add that it is good to see all those <p> tags! Your earlier pages were missing them. Having them will allow much more flexibility for styling your pages.
Last edited by gregtutor on Wed Sep 11, 2013 9:15 am, edited 1 time in total.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer and The GIMP
gregtutor
Moderator
 
Posts: 3521
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Importing Text

Postby chzuck on Wed Sep 11, 2013 1:20 pm

Greg,
Thank you much for your very valuable advice. I am determined to learn and understand how to use Kompozer correctly and make good webpages. Thank you again for your help.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby chzuck on Wed Sep 11, 2013 3:33 pm

OK, I made the suggested changes. Now I cannot get the title of the article to center. Obviously I did something wrong but I cannot find out what. Suggestions.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby wink0r on Wed Sep 11, 2013 4:09 pm

I don't see a rule for h2 in your current stylesheet. Did you remember to upload the edited stylesheet?
wink0r
 
Posts: 2429
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Importing Text

Postby chzuck on Wed Sep 11, 2013 4:42 pm

How dumb of me. I am intently trying to learn more on how to use Kompozer and excited to see these things work and I forgot that I needed to upload the CSS file. Thanks so much.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby wink0r on Wed Sep 11, 2013 5:11 pm

It is an easy thing to forget. I have updated pages or sites several times and gone to check and it was at that point that I remembered that I had overlooked that detail. Also remember to refresh the page a couple of times if your changes do not show up. Your browser will give you the page from browser cache if you have recently visited the page and that will be an old version of the page.

As an aside, there was a David Bradley garden tractor around the old homestead. It was very similar in design to the machines shown on this page. It probably dated from the 1940's or maybe the early 50's. It was a two wheeled machine with large wheels and there were a few implements with it. It was seldom used, but Dad probably plowed the garden plot with it in the spring. I think that there was also a blade that could be attached to the front of the machine and maybe a harrow.
wink0r
 
Posts: 2429
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Importing Text

Postby chzuck on Wed Sep 11, 2013 5:24 pm

I know them pretty well. At my local show, there is a collector with practically every item David Bradley ever made. They had quite a list of attachments.
Thanks again for your help. I must remember to upload that file everytime I make a change to that file. That is probably why I had problems with the menu hover the other day.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)

Re: Importing Text

Postby wink0r on Wed Sep 11, 2013 9:12 pm

Do you know if the collector has a website? It might be interesting for me to visit. Thinking about it I think there may have been a reciprocating blade mower attachment as well.
wink0r
 
Posts: 2429
Joined: Tue Aug 28, 2007 10:10 pm
Location: East Coast - USA
Country: United States (us)

Re: Importing Text

Postby chzuck on Wed Sep 11, 2013 11:24 pm

Sorry to say he does not have a website. I am sure they had one of those mowers more commonly called a sickle bar mower.
chzuck
 
Posts: 14
Joined: Sat Nov 29, 2008 5:57 pm
Location: PA
Country: United States (us)


Return to Beginner Q & A


Who is online

Users browsing this forum: Google [Bot] and 2 guests