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

[package - table]Option for default initial style (Solution provided) #9449

Closed
kuku711 opened this issue Apr 11, 2021 · 2 comments
Closed

[package - table]Option for default initial style (Solution provided) #9449

kuku711 opened this issue Apr 11, 2021 · 2 comments
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@kuku711
Copy link

kuku711 commented Apr 11, 2021

📝 Provide a description of the new feature

In order to make table more responsive for initial structure it will be useful to control the default style of the table.
In this moment (version 27.0.0) there is no option to control any of the table properties from the config.
I think it is useful to define what is my default.

What is the expected behavior of the proposed feature?
I expect it to be at config like this:

 table: {
            contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ],
            defaultStyle: { alignment: 'left' }
        }

table.defaultStyle can get any object that represent the possible table style.

 const defaultStyle = this.editor.config.get('table.defaultStyle');
 const table = writer.createElement( 'table',  defaultStyle );
  • If the solution can also be for default cell style, it will be great 😄!

If you'd like to see this feature implemented, add a 👍 reaction to this post.

@kuku711 kuku711 added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Apr 11, 2021
@kuku711
Copy link
Author

kuku711 commented Apr 11, 2021

Suggested PR for this issue #9393
If it is this, consider this issue as closed.

@Mgsy
Copy link
Member

Mgsy commented Apr 12, 2021

Suggested PR for this issue #9393
If it is this, consider this issue as closed.

The linked PR covers handling default styles for tables and table cells. It should be merged soon and will be available in the next release. I'm closing it as a duplicate.

@Mgsy Mgsy closed this as completed Apr 12, 2021
@Mgsy Mgsy added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

2 participants