volser / quill-table-ui

BSD 3-Clause "New" or "Revised" License
62 stars 15 forks source link

When calling setcontent or innerHTML an existing table becomes a single row #16

Open steve-heine opened 3 years ago

steve-heine commented 3 years ago

Injecting with insertTable works, however after saving and loading data again the resulting HTML merges all rows into a single row.

this.value = '<p>test table</p><p><br /></p><table><tbody><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></tbody></table><p><br /></p>';

test table


123
abc
456


either

this.setContent(this.value);

or

this.quill.container.firstChild.innerHTML = this.value;

results in a table with a single row

test table


123abc456