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

Is there a way to disable table settings? (rowheader for example) #1634

Open
Jujaju opened this issue Oct 10, 2019 · 2 comments
Open

Is there a way to disable table settings? (rowheader for example) #1634

Jujaju opened this issue Oct 10, 2019 · 2 comments

Comments

@Jujaju
Copy link

Jujaju commented Oct 10, 2019

Hey!

Currently I would like to disable the coulmnheader and the rowheader option completly or (in best case) just allow the rowheader option only for the first row.

Does Aloha provide this in any way?

@bernhardriegler
Copy link
Contributor

Not right now. However you can easily add this feature.

Add a check if config is set before the button is initialised here:
https://github.com/alohaeditor/Aloha-Editor/blob/dev/src/plugins/common/table/lib/table-plugin.js#L895

if (this.settings.allowRowHeaders) {
...

The scope property is used, to determine on which selection a button is shown. This could also be retrieved from the config.
https://github.com/alohaeditor/Aloha-Editor/blob/dev/src/plugins/common/table/lib/table-plugin.js#L898

Make sure to fallback to the current behaviour to not introduce a breaking change.

@bernhardriegler
Copy link
Contributor

The currently available table plugin configuration can be found in the guides:
https://www.alohaeditor.org/guides/plugin_table.html#configuration-settings

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

No branches or pull requests

2 participants