Skip to content

Conversation

@celsowm
Copy link

@celsowm celsowm commented Jul 23, 2025

This pull request adds support for specifying border styles for each side of a table. This includes changes to the Table Properties GUI to allow you to set the border-top-style, border-right-style, border-bottom-style, and border-left-style properties.

The following changes were made:

Added new commands for each side of the border: TableBorderTopStyleCommand, TableBorderRightStyleCommand, TableBorderBottomStyleCommand, and TableBorderLeftStyleCommand.
Modified TablePropertiesView to include new dropdowns for each border side.
Updated TablePropertiesUI to handle the new fields.
Updated the table converters to handle the new border styles.
Added the new commands to the TableProperties plugin.

@CKEditorBot
Copy link
Collaborator

🎉 Snyk checks have passed. No issues have been found so far.

code/snyk check is complete. No issues have been found. (View Details)

@CKEditorBot
Copy link
Collaborator

📢 Changelog entry reminder

Hi there! 👋

Thanks for opening this pull request! If your changes affect end users, please add a changelog entry to describe them.
We use a Markdown-based system - see the Changelog entries guide for details.

✍️ How to

Run the following command:

yarn run nice

This guide will help you create a new changelog file. You can add as many entries as needed – one per distinct change.

Note

Skip internal changes, such as typo fixes or refactors, as they won't be included in the published changelog.

Tip

Reviewers do not need to copy anything into the merge commit message when merging the pull request.

@charlttsie
Copy link
Contributor

Hi @celsowm! Sorry it took a while to look into the PR. Thanks a lot for this contribution - per‑side table borders option is a great addition to table properties.

After initial tests, I can see there's one main issue - the side commands import getNewTableProperty from utils/table-properties, but this function does not exist. As a result, trying to use the new option and modify individual borders results in an error:

Uncaught TypeError: (0 , _utils_table_properties__WEBPACK_IMPORTED_MODULE_1__.getNewTableProperty) is not a function
    at Object.callback (tableborderleftstylecommand.ts:53:1)
    at Model._runPendingChanges (model.ts:1109:1)
    at Model.change (model.ts:234:1)
    at TableBorderLeftStyleCommand.execute (tableborderleftstylecommand.ts:52:1)
    at TableBorderLeftStyleCommand.<anonymous> (observablemixin.ts:277:1)
    at TableBorderLeftStyleCommand.fire (emittermixin.ts:240:1)
    at <computed> [as execute] (observablemixin.ts:281:1)
    at CommandCollection.execute (commandcollection.ts:73:1)
    at ClassicEditor.execute (editor.ts:879:1)
    at TablePropertiesView.<anonymous> (tablepropertiesui.ts:486:1)
(anonymous) @ tableborderleftstylecommand.ts:53
_runPendingChanges @ model.ts:1109
change @ model.ts:234
execute @ tableborderleftstylecommand.ts:52
(anonymous) @ observablemixin.ts:277
fire @ emittermixin.ts:240
<computed> @ observablemixin.ts:281
execute @ commandcollection.ts:73
execute @ editor.ts:879
(anonymous) @ tablepropertiesui.ts:486
fire @ emittermixin.ts:240
set @ observablemixin.ts:139
(anonymous) @ tablepropertiesview.ts:674
fire @ emittermixin.ts:240
fireDelegatedEvents @ emittermixin.ts:873
fire @ emittermixin.ts:265
fireDelegatedEvents @ emittermixin.ts:873
fire @ emittermixin.ts:265
(anonymous) @ buttonview.ts:286
callback @ template.ts:993
fire @ emittermixin.ts:240
domListener @ emittermixin.ts:332

Reproduction steps

  1. Open e.g. the ckeditor5/tests/manual/all-features.html manual test
  2. Select the table and open the "Table properties" balloon
  3. Try to apply table border styles
Screen.Recording.2025-08-21.at.10.10.01.mov

An additional observation is that the fields in the Table properties balloon are slightly misaligned:
Screenshot 2025-08-21 at 10 07 25

Could you please look into the issue? Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants