Hi,

I am trying to copy/paste a table from word or excel into FCKEditor. The table appears to copy fine into the editor window. But when I save the page, the table does not appear correctly. Each cell is rendered vertically. Is this a style issue I need to tweak in my nitobe css? Or is this an FCKEditor style issue?

Any help/insight is appreciated.

Thanks,
Xamder

CommentFileSizeAuthor
#7 Fullscreen capture 09122010 164627.jpg68.92 KBHTF

Comments

xamder’s picture

Category: support » bug
Anonymous’s picture

Category: bug » support
m1mic’s picture

@xamder - On some of the sites I maintain, I use both Nitobe and the FCKEditor and haven't been able to repeat the bug you mentioned. WYSIWYG editors like FCKeditor, TinyMCE, etc. can sometimes display content a little bit wonky when you cut and paste from other applications. Microsoft Word and Excel tend to have underlying styling code that comes along for the ride when you cut and paste (e.g. class="MsoNormal" is a prime example). To get around this, the FCKeditor has a Paste From Word option (works for any program BTW) to cleanse the content from the styling before it gets pasted into the editor. Are you cleansing your table before bringing it in?

Also, could you elaborate a little bit more about your setup? Which Drupal version of FCKEditor are you running? Which version of the FCKEditor are you using with the module (downloaded from http://fckeditor.com)?

bobby endarr ramdin’s picture

I tried pasting from word but didn't work either, did in drupal 5 though.

Drupal 6.13,
FCKeditor 2.6.4.1
I've got tables to show up in FCKeditor by creating them first in html in another editor then switching FCKeditor off and pasting the code into it. Then select the input format to Full HTML. Then save / preview..

moshebeeri’s picture

I have the same problem you can see it at http://ofno.co.il
I also notice it does not show pictures.
it seems like a Drupal bug showing nodes since switching to html view reveals that FCK converts the data correctly, more over I have use TinyMCE before and switch to FCK to fix the problem, but apparently it not WYSIWYG bug.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

WYSIWYG editors generally have a special "Paste from Word" function. Are you using this or just a regular paste operation?

Please attach the HTML and a screen shot of a node with a table that you pasted into the editor that is not rendering correctly.

Additionally, do you get correct behavior if you are using one of the default Drupal themes such as Garland?

HTF’s picture

StatusFileSize
new68.92 KB

I have a similar problem to Xamder. When I create a table which has 2 cells in 1 row, one of which containing an image it looks fine in editor window however once the page is saved the text appears below the bottom on the image (see screen shot). This is despite the fact that I use "valgin=top" on the row and on the cell containing the text. I have found a solution to this is to add &nbsp; between <td> and <img>. As you will see in the screenshot the image and text in the third row are vertically-aligned correctly. It is alright for me to do this however I can't expect my client to keep doing this as they do not know html and want to just use the wysiwyg.

I have tried this in a page without any right side blocks and I am still getting the same problem.

Below you will find the html for this page.

Any suggestions of why this is happening and what I can do to stop it from happening?

<h2>Pictures of bristol</h2>
<table>
  <tbody>
    <tr valign=top>
      <td><IMG alt="" align=left src="http://www.mydomain.org.uk/files/images/bristol/bristol2_sq.gif" width=150 height=150></td>
      <td>text here text here text <br>
        here text here text here text here <br>
        text here text here text here text <br>
        here text here text here text here text</td>
    </tr>
    <tr valign=top>
      <td><IMG alt="" align=left src="http://www.mydomain.org.uk/files/images/bristol/bristol3_sq.gif" width=150 height=150></td>
      <td valign=top>text here text here text <br>
        here text here text here text here <br>
        text here text here text here text <br>
        here text here text here text here text</td>
    </tr>
    <tr valign=top>
      <td>&nbsp;<IMG alt="" align=left src="http://www.mydomain.org.uk/files/images/bristol/bristol4_sq.gif" width=150 height=150></td>
      <td valign=top>text here text here text <br>
        here text here text here text here <br>
        text here text here text here text <br>
        here text here text here text here text</td>
    </tr>
  </tbody>
</table>
bobby endarr ramdin’s picture

Maybe this may help. Bob3009
Have you tried adding css to the td like; float:left; you can use style sheet or style inline
td style="float:left;"

HTF’s picture

Hi @endarr

Thank you for your help with this. I tried adding css to the cell but it didn't seem to work. After revisiting it today I have found that I can solve the problem by vertically aligning the cell with the image in it as well as the cell with the text in it.