Creating a column group

I was assigned a task of extending our RTE built on Prosemirror. I am new to the packages and learning it has been a slog with our previous developer gone.

I am trying to create a column group node, which would look something like this: .

I extended the note schema in the examples as follows:

const noteSchema = new Schema({
  nodes: {
    text: {},
    paragraph: {
      content: "text*",
      group: "colNode",
      toDOM() { return ["paragraph", 0] },
      parseDOM: [{tag: "p"}]
    },
    column: {
      content: "text*",
      group: "colNode",
      toDOM() { return ["column", 0] },
      parseDOM: [{tag: "column"}]
    },
     columnGroup: {
      content: "column+",
      group: "colNode",
      toDOM() { return ["columngroup", 0] },
      parseDOM: [{tag: "columngroup"}]
    },
    doc: {
      content: "colNode+"
    }
  }
})

I have created a command that creates the column group, but what I really need is to create a column group based on user input of how many columns they want which can be between 2-4. If I create a column group while in a paragraph, I want to pull all the contents from the paragraph and place it in the left most column.

I can create the column group. I can pull the text I want to place in the left most column. I am at a loss of how to insert the content.

Should I be using create and passing in what I want the node to contain, ie number of columns and content for the columns? Has anyone implemented something similar to this?

I sifted through the forum and some examples others put up. I figured out how to get started on generating the column group with the contents I want it to contain. I can take input from the user and generate the number of columns they want.