ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.61k stars 336 forks source link

setBlockType() in prosemirror-commands can not set all selected table cells block type #1334

Closed cobbcheng closed 1 year ago

cobbcheng commented 1 year ago

I'm using Tiptap to implement a table component, but I can't perform a unified set heading operation for all selected cells. I found that the implementation of the selection area in this method is slightly problematic. It does not have a CellSelection object compatible with the table.

thanks!

https://user-images.githubusercontent.com/15278560/201897294-c12d2c9a-21ff-4c56-89fc-5dc0929fbb0e.mov

image
cobbcheng commented 1 year ago
image

Here is my code for reference, thanks!

marijnh commented 1 year ago

I think attached patch should address this.