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

Border not showing when copying from Excel #18016

Open
iisioe opened this issue Feb 28, 2025 · 2 comments
Open

Border not showing when copying from Excel #18016

iisioe opened this issue Feb 28, 2025 · 2 comments
Labels
pending:feedback This issue is blocked by necessary feedback. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@iisioe
Copy link

iisioe commented Feb 28, 2025

πŸ“ Provide detailed reproduction steps (if any)

  1. Copy tables from an Excel with border
  2. Paste it into the editor

βœ”οΈ Expected result

Generate the html code correctly and get the same result as it is display on the Excel with the borders.

❌ Actual result

Border displays properly in CKEditor but when the generated HTML is rendered outside, it loses the top border.

Image

Sample Tablexlsx.xlsx

Generated HTML code of CKEditor

Image

<figure class="table" style="width:96pt;"><table class="ck-table-resized"><colgroup><col style="width:50%;"><col style="width:50%;"></colgroup><tbody><tr><td style="background-color:white;border-color:windowtext;border-width:0.5pt;height:14.4pt;padding-left:1px;padding-right:1px;padding-top:1px;vertical-align:bottom;width:48pt;">&nbsp;</td><td style="background-color:white;border-bottom-style:solid;border-color:windowtext;border-left-style:none;border-right-style:solid;border-top-style:solid;border-width:0.5pt;padding-left:1px;padding-right:1px;padding-top:1px;vertical-align:bottom;width:48pt;"><span style="color:black;font-family:&quot;Aptos Narrow&quot;, sans-serif;font-size:11pt;">SYS</span></td></tr><tr><td style="background-color:white;border-bottom-style:solid;border-color:windowtext;border-left-style:solid;border-right-style:solid;border-top-style:none;border-width:0.5pt;height:14.4pt;padding-left:1px;padding-right:1px;padding-top:1px;vertical-align:bottom;"><span style="color:black;font-family:&quot;Aptos Narrow&quot;, sans-serif;font-size:11pt;">Tender</span></td><td style="background-color:white;border-bottom-style:solid;border-color:windowtext;border-left-style:none;border-right-style:solid;border-top-style:none;border-width:0.5pt;padding-left:1px;padding-right:1px;padding-top:1px;text-align:right;vertical-align:bottom;"><span style="color:black;font-family:&quot;Aptos Narrow&quot;, sans-serif;font-size:11pt;">5229</span></td></tr></tbody></table></figure>

πŸ“ƒ Other details

  • Browser: Microsoft Edge
  • OS: Windows 11
  • First affected CKEditor version: CKEditor 5 (Premium)
  • Installed CKEditor plugins:
  • PasteFromOffice,
  • PasteFromOfficeEnhanced,
  • Alignment,
  • Autoformat,
  • AutoLink,
  • Autosave,
  • BlockQuote,
  • Bold,
  • Bookmark,
  • CaseChange,
  • Code,
  • Essentials,
  • FindAndReplace,
  • FontBackgroundColor,
  • FontColor,
  • FontFamily,
  • FontSize,
  • FormatPainter,
  • Heading,
  • Highlight,
  • HorizontalLine,
  • Indent,
  • IndentBlock,
  • Italic,
  • Link,
  • List,
  • ListProperties,
  • Paragraph,
  • RemoveFormat,
  • ShowBlocks,
  • SpecialCharacters,
  • SpecialCharactersArrows,
  • SpecialCharactersCurrency,
  • SpecialCharactersEssentials,
  • SpecialCharactersLatin,
  • SpecialCharactersMathematical,
  • SpecialCharactersText,
  • Strikethrough,
  • Subscript,
  • Superscript,
  • Table,
  • TableCaption,
  • TableCellProperties,
  • TableColumnResize,
  • TableProperties,
  • TableToolbar,
  • Template,
  • TextTransformation,
  • TodoList,
  • Underline

If you'd like to see this fixed sooner, add a πŸ‘ reaction to this post.

@iisioe iisioe added the type:bug This issue reports a buggy (incorrect) behavior. label Feb 28, 2025
@Witoso
Copy link
Member

Witoso commented Feb 28, 2025

The place you show content from the editor on needs to always include the content styles. It will always look different otherwise.

@Witoso Witoso added the pending:feedback This issue is blocked by necessary feedback. label Feb 28, 2025
@Reinmar
Copy link
Member

Reinmar commented Feb 28, 2025

Example of how it looks when content styles are loaded: https://jsfiddle.net/ury7L8hs/

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending:feedback This issue is blocked by necessary feedback. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants