aieditor-team / AiEditor

AiEditor is a next-generation rich text editor for AI.
https://AiEditor.dev
GNU Lesser General Public License v2.1
888 stars 90 forks source link

Markdown format empty table validation failure #19

Open qsx9527 opened 6 months ago

qsx9527 commented 6 months ago
|  |  |
| --- | --- |
|  |  |

1
| 1 |  |
| --- | --- |
|  |  |

The above example raises the following error: 输入图片说明

error: Uncaught (in promise) RangeError: Invalid content for node tableHeader: <>

he following example is normal.

| 1 |  |
| --- | --- |
|  |  |

1

@yangfuhai

qsx9527 commented 6 months ago

当编辑器里的内容为

| 序号 | 其他其他 |
| ---- | -------- |
| 1    |          |
| 2    |          |
| 3    |          |
| 4    |          |

的时候,api方法 getMarkdown()会报错,提示此处c为null 截图_选择区域_20240306161659

qsx9527 commented 4 months ago

这种方式就可以☺

setContent(content: string) { // this.focus().clear().insert(content); this.focus().clear().innerEditor.commands.setContent(content); return this; }