-
Notifications
You must be signed in to change notification settings - Fork 57
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
EZP-31380: Disable manage rows/cells buttons for table and row toolbars #1232
EZP-31380: Disable manage rows/cells buttons for table and row toolbars #1232
Conversation
|
||
export default class EzTableCellConfig extends EzConfigTableBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good if the tableCell
and tableHeader
would still extend the EzConfigTableBase.
You can do something like this to override the buttons array:
constructor(config) {
super(config);
const editAttributesButton = config.attributes[this.name] || config.classes[this.name] ? `${this.name}edit` : '';
this.buttons = [
'ezmoveup',
'ezmovedown',
editAttributesButton,
'tableHeading',
'ezembedinline',
'ezanchor',
'eztablerow',
'eztablecolumn',
'eztablecell',
'eztableremove',
...config.extraButtons[this.name],
];
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach.
|
||
export default class EzTableCellConfig extends EzConfigTableBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach.
@SerheyDolgushev can you open PR for 3.0 in ezplatform-richtext? |
Doing that right now |
@dew326 could you merge it up? |
AlloyEdior allows running the commands to manipulate the table content only when active element is
td
orth
. So there is no need to have "insert rows"/"insert columns" buttons in "table" and "table row" toolbars.Steps to reproduce:
Current results:
No new rows/cells are inserted
Expected result:
New rows/cells will be inserted
This happens because of https://github.com/liferay/alloy-editor/blob/master/src/plugins/tabletools.js#L821
Checklist:
$ composer fix-cs
)