2

I have a problem that occasionally a <p> tag is being added to a table cell, usually when someone pastes something into it.

Is there a way to remove that <p> and just have the cell be an empty <td> or <th>, ideally without editing the source?

Is there an option that could be added through the advanced settings?

1
  • When they're pasting, do they use the "paste as plain text" option? Jan 16 '13 at 12:10
3

If the reason is appearance, you can remove any margin/padding formatting with css, like:
table p {padding:0; margin:0}
Or you can add specific classes to the styling menu of wygwam for tables, for a more fine grained control over styling tables.

0

what about using one of the HTML stripper add-ons?

You can find quite a few here on Devot:ee.

0

I doubt you can do it easily. A custom extension to parse the text on submission might do it, but the issue is CKEditor forces <p> tags around pretty much every inline element. You're better off just leaving it and changing the styles like GDMac suggested.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.