-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
WYSIWYG - Easier header rows #985
Comments
Confluence solved this by having the first row be a header by default and then adding a dedicated menu row for then a table is currently selected. |
I added a "hack" that adds a button for toggling row/column headers in the context menu of the table and at the end of the main toolbar (couldn't figure out a way to add it to the table menu of the main toolbar yet). Edit: As an alternative, a second row similar to Confluence can be added. This would look like this: <script>
window.addEventListener('editor-tinymce::pre-init', event => {
const mceConfig = event.detail.config;
mceConfig.toolbar = [
mceConfig.toolbar,
'table | tableinsertrowbefore tableinsertrowafter tabledeleterow | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter | tableinsertcolbefore tableinsertcolafter tabledeletecol | tablemergecells tablesplitcells | tablerowheader tablecolheader | tablecellbackgroundcolor | tabledelete'
];
mceConfig.table_toolbar = 'tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol | tablerowheader tablecolheader';
});
</script> |
Thanks for the input and sharing of hack/workaround @Roemer, this promoted me to put in a solution for the next release. |
Hello, column headers would be nice. Seems to me this would just be feature parity. Why have the feature for rows, but not columns? Even if there isn't much demand yet. It's the exact same thing just on a different axis. If the feature is already written, and exists, why not implement it? |
At the moment, to set a header on a table you have to click into the row > Click the table options in the top toolbar > Row > Row Properties > Change row type to header.
We should look to either make the first row, if more than one row, be a header or make it easier to set a header row.
Might be limited on TinyMCE control, Possibly hook into such an event like this:
https://github.com/tinymce/tinymce/blob/master/src/plugins/table/main/ts/api/Events.ts#L14
Might be tricky.
The text was updated successfully, but these errors were encountered: