what do you consider as the contents of a table?
If you want the contents of the whole table you'll get an array of contents simply with:
table.contents // array
Or you simply do:
app.selection.contents; // array of contents of selected cells or selected table
I consider it as some text without any formatting and constructor, something like copy from pdf.
my goal just copy the text from cells will paste to paragraph and no need to convert the cell to text.
may get string from clipboard is a collect method for this script.
But I don't know how to write the code.
why do you mention the clipboard? To copy the contents of your selection is not necessary.
If you collected the contents to a variable you simply can assign the new contents to e.g. a selection point of some text to add it.
Or assign it as contents of a paragraph to change the contents of the paragraph.