Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13333 closed Bug (invalid)

CK Editor - Tables Not showing with Copied HTML

Reported by: David Cairncross Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

HI there,

I am currently migrating HTML from a page into the CKEditor Plug in.

Unfortunately everytime I drop a table into the editor, it doesn't display. I am currently migrating a no. of these pages so any help would be hugely appreciated.

Thank you.

Kind Regards, David

Attachments (3)

eyecare_TableDisplayedNOTinCKeditor.PNG (73.0 KB) - added by David Cairncross 5 years ago.
imagewhenaddedinCKeditor_NOTTABLEBORDERS.PNG (60.0 KB) - added by David Cairncross 5 years ago.
Borders Dissapear when added into CK editor
imagewhenaddedinCKeditor_NOTTABLEBORDERS.2.PNG (73.9 KB) - added by David Cairncross 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by David Cairncross

Changed 5 years ago by David Cairncross

Borders Dissapear when added into CK editor

comment:1 Changed 5 years ago by Piotrek Koszuliński

Status: newpending

comment:3 Changed 5 years ago by David Cairncross

Hi There,

I understand that you can re-write the code although I am currently migrating over 50,000 pages with these tables in this editor and do not have the time to modify the HTML.

The most recent 'imagewhenadded...2' attachment shows where I have dropped the code although the tables are still not showing properly. Could you please assist me by telling me where the code is to be dropped. As in which file do we drop the code on and where?

Could you please re-open the ticket as the issue hasn't been solved?

Thank you. David

Last edited 5 years ago by David Cairncross (previous) (diff)

Changed 5 years ago by David Cairncross

comment:4 Changed 5 years ago by Piotrek Koszuliński

If you need guidance please contact http://cksource.com or ask a question on http://stackoverflow.com.

This ticket could be reopened only if you describe a valid issue. You only say that borders are lost, but it does not mean yet that something is working incorrectly. You would need to explain precisely how your border looks (in terms of HTML), how you configured editor, how you load that table, etc. But I can say you straight away, that you might forgot about:

  • ACF,
  • cache,
  • contents styles (contents.css),
  • etc.

So before we see any chance that this is a real bug, we cannot reopen the ticket and before we can reproduce the bug, we cannot confirm it.

comment:5 Changed 5 years ago by David Cairncross

Thank you for your feedback. Sincere apologies if this was unclear.

Everything in terms of styles are lost within the 'CK Editor' once we hit 'Publish'. The 'CKeditor' functionality 'Strips' these 'divs' leaving us with an 'unstyled' page. 'Borders/Hyperlinks/Font Types' are completely different when we drop the page in.

What I am trying to do is STOP the 'Content Filtering' of my styles by dropping the following code in my 'config.js' file.

config.allowedContent = true;

I have done so BUT still the same result when I publish new pages & cleared cache.

Could you please tell me where we modify the file type ie. 'config.js' to disable 'Content Filtering' and breaking my styles on the page??

comment:6 Changed 5 years ago by Jakub Ś

What I am trying to do is STOP the 'Content Filtering' of my styles by dropping the following code in my 'config.js' file.

This can be switched of but only to a certain level. If you are using invalid HTML (e.g. div inside spans) CKEditor will fix that code and there is nothing that can be done here.
If we allow it editor might become unstable with simple selection activities and we don't want that.

Everything in terms of styles are lost within the 'CK Editor' once we hit 'Publish'. The 'CKeditor' functionality 'Strips' these 'divs' leaving us with an 'unstyled' page. 'Borders/Hyperlinks/Font Types' are completely different when we drop the page in.

It is always better to work with real example. If possible please provide part of HTML that you paste into editor and which gets broken.

Please note that styles should be consistent across various places in application.
Let's say your old page has set of styles. Same or similar styles should be applied to editor. If you are using iframed editor then you should put these styles into contents.css file. If you are using inline editor you should attach them to page where editor is used.
Finally place where page is published should also have same styles assigned.

When you copy HTML from one place to another only HTML and its inline styles get copied. Styles from external style sheets don't get copied (this is different file) and it is developer duty to handle them.


Hope this helps you out. If not, please problematic HTML and tell us what gets removed and when. Screen shots are also very welcome.

comment:7 Changed 5 years ago by Piotrek Koszuliński

Everything in terms of styles are lost within the 'CK Editor' once we hit 'Publish'. The 'CKeditor' functionality 'Strips' these 'divs' leaving us with an 'unstyled' page. 'Borders/Hyperlinks/Font Types' are completely different when we drop the page in.

It sounds like it isn't CKEditor, but your backend what filter styles.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy