Page 1 of 1

[Solved]TinyMCE and Word copy and paste question

Posted: Sat Sep 17, 2011 1:53 am
by jasnick
Quick question: if text is copied and pasted from a Word doc using the correct W icon, does the text retain the Word styling or does it take on the site CSS styling.

Thanks

Re: TinyMCE and Word copy and paste question

Posted: Sat Sep 17, 2011 3:45 am
by frankmanl
I never use Word paste, but so to see it creates for every line of text a class. You then just have to define these classes in your css.

Code: Select all

<p class="Standard"> </p>
<table style="width: 632px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="4" width="632">
<p class="TableContents">Koffiemousse met noten</p>
</td>
</tr>
<tr>
<td width="175">
<p class="TableContents">Soort gerecht</p>
</td>
<td width="171">
<p class="TableContents"><a href="http://www.xs4all.nl/%7Erjmmilt/menu/nager447.htm">Nagerecht</a></p>
</td>
<td width="118">
<p class="TableContents">Herkomst</p>
</td>
<td width="168">
<p class="TableContents"><a href="http://www.xs4all.nl/%7Erjmmilt/menu/onbek415.htm">Onbekend</a></p>
</td>
</tr> et cetera
The code above is of a table with a couple of rows and cells and content that I pasted that way.
I don't know if you become happy when using Word paste. I prefer plain text paste and then add the styling by hand.
You could of course just give it a try, eh?!

Frank

Re: TinyMCE and Word copy and paste question

Posted: Sat Sep 17, 2011 3:56 am
by jasnick
Hi Frank

It's not for me !!! I hate WYSIWYG!

Its for my client who will mainly be copying and pasting articles that she is sent and will upload to the site using WYSIWYG.

She did a test one (using the W icon) and it took the styles from the original Word doc.

I see that the Styles box in TinyMCE only contains classes and all my styles are in ID's - so I need to change them to classes - is that the case?

Thanks

Re: TinyMCE and Word copy and paste question

Posted: Sat Sep 17, 2011 4:11 am
by frankmanl
Oh I see, yes, clients pasting Word documents and expecting it all works out. I know. ;)
Sorry, I'm no expert on this, but it seems you would indeed have to create classes in your css. But then, are those Word docs consistent? The way I see Word being used is that people just do something and are happy as long as the document shows 'quite alright'. No consequent usage of styles. How can that be converted into consistent web content?

I don't give my clients support for Word being pasted. I tell them to use the plain text paste and then add the styling by hand. Most of the time I reduce the posibilities for styling to bold, italic, underlined, ordered and unordered lists en two heads: H3 and H4 for heads and subheads.
For most websites this is enough and it assures the design won't get messed up too much.
Sometimes I add special styles, e.g. to display text in red.

Frank

Re: TinyMCE and Word copy and paste question

Posted: Sat Sep 17, 2011 5:07 am
by jasnick
Yes, its a constant battle! OK, will try doing some classes for styles and see what happens. I will ask them to keep Word docs as simple as possible in the hope they will look OK. I can understand why they want to copy and paste as the articles are sometimes quite lengthy.

Thanks.