#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)
Change History (10)
Changed 10 years ago by
Attachment: | eyecare_TableDisplayedNOTinCKeditor.PNG added |
---|
Changed 10 years ago by
Attachment: | imagewhenaddedinCKeditor_NOTTABLEBORDERS.PNG added |
---|
comment:1 Changed 10 years ago by
Status: | new → pending |
---|
Did you read http://docs.ckeditor.com/#!/guide/dev_acf?
comment:2 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
http://docs.ckeditor.com/#!/guide/dev_acf
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
http://docs.ckeditor.com/#!/guide/dev_disallowed_content
http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraAllowedContent
http://nightly.ckeditor.com/14-03-20-07-05/full/samples/datafiltering.html
I think the problem is that border is defined in border attribute. In HTML 5 the border attribute is not supported and you should use CSS instead (that ACF transformations should help in this case.):
http://www.w3schools.com/tags/tag_table.asp
http://www.w3schools.com/tags/att_table_border.asp
http://www.w3schools.com/css/css_table.asp
https://html.spec.whatwg.org/multipage/tables.html#the-table-element
NOTE: I remember that some time ago border attribute was marked supported and it could contained 0 (layout table) or 1 (non-layout table). I can see this is no longer the case.
comment:3 Changed 10 years ago by
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
Changed 10 years ago by
Attachment: | imagewhenaddedinCKeditor_NOTTABLEBORDERS.2.PNG added |
---|
comment:4 Changed 10 years ago by
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 10 years ago by
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 10 years ago by
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 10 years ago by
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.
Borders Dissapear when added into CK editor