-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Implement table commands #3166
Comments
Note that a cell can be split vertically or horizontally. And that it only makes sense if there's "merge cells" too. |
As I have almost everything working more or less I'd like to precise some implementation details.
editor.execute( 'insertRow', { rows: 7, at: 4 } );
editor.execute( 'insertColumn', { columns: 3, at: 0 );
editor.execute( 'removeRow' );
editor.execute( 'removeColumn' );
editor.execute( 'setTableHeaders', { rows: 2 } );
editor.execute( 'setTableHeaders', { rows: 0, columns: 3 } );
editor.execute( 'mergeLeft' );
editor.execute( 'mergeUp' ); |
ps.: the command names are rather secondary thing for now - I'd like to see your opinions on behavior and/or usage in the first place. |
I think that our primary objective should be to make all commands work as you implemented You implemented the So, we need commands like:
BTW. I have a problem with these command names... What if we'll have something else which can be merged right or has rows? I considered prefixing all commands with "table" but I guess we can give the table feature a priority. We'll prefix the 2nd+ commands :D PS. Mind that I added "Cell" to |
@Reinmar Thank's - that's why I've posted this - to be sure which way is better. I'll update current implementation of the commands. |
IMO those EDIT: Same with cell splitting - personally, for me, it would be natural and sufficient if after splitting cell it would just split "totally". I mean that the merged cell would split into the smallest cells. It wouldn't be a problem if then I'd be able to select some cells and then merge it again. |
@scofalik probably but cell merging from the selection is phase 2 so this solution will last at least for some time. |
Of course, I realize that. BTW. I just edited the previous post. |
Feature: Initial table support. Closes #4. Closes #7. Closes #9.
The commands that need to be implmemented:
The text was updated successfully, but these errors were encountered: