Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When table with header is copied all it contents is wrapped inside thead tag #422

Open
f1ames opened this issue May 31, 2017 · 6 comments
Open
Labels
status:confirmed An issue confirmed by the development team. type:bug A bug.

Comments

@f1ames
Copy link
Contributor

f1ames commented May 31, 2017

Are you reporting a feature or a bug?

Bug

Check if the issue is already reported

Extracted from #417.

Provide detailed reproduction steps (if any)

  1. Set editor content to
<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<thead>
	<tr>
		<th scope="col">1</th>
		<th scope="col">2</th>
	</tr>
	</thead>
	<tbody>
	<tr>
		<td>3</td>
		<td>4</td>
	</tr>
	</tbody>
</table>

<p>Foobar</p>
  1. Select and copy table.
  2. Paste.

Expected result

The table structure is the same as copied part.

Actual result

Whole table content is wrapped inside thead tag:

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<thead>
		<tr>
			<th scope="col">1</th>
			<th scope="col">2</th>
		</tr>
		<tr>
			<td>3</td>
			<td>4</td>
		</tr>
	</thead>
</table>

Other details

  • Browser: All browsers supporting tableselection plugin.
  • OS: Checked on OS X.
  • CKEditor version: 4.7.0
  • Installed CKEditor plugins:
config.plugins =
	'table,' +
	'tableresize,' +
	'tableselection,' +
	'toolbar,' +
	'wysiwygarea';
@f1ames f1ames added status:confirmed An issue confirmed by the development team. type:bug A bug. labels May 31, 2017
@Comandeer Comandeer self-assigned this Jun 1, 2017
@f1ames f1ames changed the title When table with header is copied all it contents is wrapped inside thead tag. When table with header is copied all it contents is wrapped inside thead tag Jul 5, 2017
@pgrunewald
Copy link

This bug still occurs for CKEditor 4.10 (nightly). Do we have some update on the progress?

@pgrunewald
Copy link

This bugs seems to be fixed with version 4.11.4.

@f1ames
Copy link
Contributor Author

f1ames commented Mar 12, 2021

This bugs seems to be fixed with version 4.11.4.

Let's recheck if it's already fixed.

@Comandeer Comandeer self-assigned this Mar 30, 2021
@Comandeer
Copy link
Member

The issue is still reproducible on the latest master 😞

@Comandeer Comandeer added size:M and removed size:XXS labels Mar 30, 2021
@Comandeer Comandeer removed their assignment Mar 30, 2021
@CharlesBelov
Copy link

Workaround:

  1. Below the problem table, create a new table with the same number of columns and two rows.
  2. In the first row of the new table, manually type the column headings. Do not copy & paste.
  3. Right-click the new table, choose Table Properties and set Headings to First Row. Adjust width field if needed.
  4. In the problem table, select all cells except for the heading row
    a. The easiest way to do this is:
    i. Click between the cell border and the first letter of the first cell
    ii. Scroll down to the last table row
    iii. Hold down the shift key
    iv. Click between the last letter of the last cell and the cell border. If the cell is blank, just click in the cell.
    v. Release the shift key
  5. Ctrl-C to copy
  6. Click in the first column, second row of the new table
  7. Ctrl-V to paste
  8. Right-click in the blank row which will now be at the bottom of the newly populated table
  9. Choose Row > Delete row to delete the blank row
  10. Save the draft

@sculpt0r
Copy link
Contributor

sculpt0r commented Oct 7, 2022

At https://nightly.ckeditor.com/22-10-07-06-04/full/samples/ & chrome it seems to be fixed 🤔 ;)

@ckeditor ckeditor deleted a comment from Nextinbackup Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

6 participants