cycleccc / wangEditor-next

wangEditor-next —— 基于 slate.js 的富文本编辑器。wangEditor-next —— rich text editor, based on slate.js.
https://cycleccc.github.io/docs/
MIT License
274 stars 24 forks source link

功能:表格表头`<caption>`展示 #335

Open quhongli123 opened 2 weeks ago

quhongli123 commented 2 weeks ago

bug 描述

<table>
<caption>Table 2: Effects of the average contact for each network structure</caption>
<tr>
<td>Network Structure</td>
<td>Erds-Rényi</td>
<td>Regular</td>
<td>Scale-Free</td>
</tr>
<tr>
<td>$\left(u_{1}, u_{2}\right)(\%)$</td>
<td>$(5.10,3.94)$</td>
<td>$(5.08,3.93)$</td>
<td>$(8.14,8.10)$</td>
</tr>
<tr>
<td>$\left(w_{1}, w_{2}\right)$</td>
<td>$(0.581,0.615)$</td>
<td>$(0.582,0.615)$</td>
<td>$(0.529,0.529)$</td>
</tr>
<tr>
<td>Gini</td>
<td>$1.451\times 10^{-2}$</td>
<td>$1.454\times 10^{-2}$</td>
<td>$2.310\times 10^{-4}$</td>
</tr>
<tr>
<td>SW</td>
<td>0.685</td>
<td>0.685</td>
<td>0.627</td>
</tr>
</table>
image

应该是

Table 2: Effects of the average contact for each network structure
Network Structure Erds-Rényi Regular Scale-Free
$\left(u_{1}, u_{2}\right)(\%)$ $(5.10,3.94)$ $(5.08,3.93)$ $(8.14,8.10)$
$\left(w_{1}, w_{2}\right)$ $(0.581,0.615)$ $(0.582,0.615)$ $(0.529,0.529)$
Gini $1.451\times 10^{-2}$ $1.454\times 10^{-2}$ $2.310\times 10^{-4}$
SW 0.685 0.685 0.627

<caption>Table 2: Effects of the average contact for each network structure</caption> 没有展示

quhongli123 commented 2 weeks ago

或者如何自定义加入caption

cycleccc commented 2 weeks ago

暂时是没有做这个解析,可能得调研一下是否有必要内置,想要自定义可以注册自定义插件改写 table-module 的解析和渲染函数,添加对 caption 的解析。未来一段时间可能会解耦部分插件或功能以及完善自定义插件的使用。