When calling setcontent or innerHTML an existing table becomes a single row
steve-heine opened this issue · 0 comments
steve-heine commented
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
1 | 2 | 3 |
a | b | c |
4 | 5 | 6 |
either
this.setContent(this.value);
or
this.quill.container.firstChild.innerHTML = this.value;
results in a table with a single row
test table
1 | 2 | 3 | a | b | c | 4 | 5 | 6 |